mycpp Code Generation

Measure the speedup from mycpp, and the resource usage.

Source code: oil/mycpp/examples

User Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
fib_iter 4 896 0.004
modules 2 173 0.010
fib_recursive 11 941 0.011
loops 4 295 0.013
asdl_generated 7 373 0.019
parse 29 754 0.039
scoped_resource 49 1,032 0.047
files 4 72 0.052
tuple_return_value 16 189 0.085
containers 12 103 0.115
classes 3 17 0.189
length 45 207 0.216
cartesian 89 331 0.269
escape 99 346 0.287
cgi 255 501 0.510
varargs 15 12 1.275
control_flow 208 106 1.965

Max Resident Set Size (MB)

Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).

example name C++ Python C++ : Python
classes 4.5 10.7 0.41
parse 3.8 7.6 0.50
asdl_generated 3.7 7.1 0.52
cartesian 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
cgi 3.7 6.9 0.53
escape 3.7 6.9 0.53
loops 3.8 7.1 0.54
tuple_return_value 3.8 7.1 0.54
fib_iter 3.8 6.9 0.55
files 3.8 6.9 0.55
modules 3.8 6.9 0.55
control_flow 3.8 6.8 0.56
fib_recursive 3.8 6.8 0.56
length 3.9 6.9 0.57
containers 28.7 47.8 0.60
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cartesian 0 4 0.000
cgi 0 16 0.000
classes 0 13 0.000
control_flow 0 8 0.000
fib_recursive 0 8 0.000
modules 0 8 0.000
parse 0 12 0.000
containers 4 32 0.125
asdl_generated 4 8 0.451
tuple_return_value 4 8 0.501
varargs 50 60 0.829
files 4 4 0.940
fib_iter 4 4 0.948
escape 8 8 1.000
length 0 0 NA
loops 0 0 NA
scoped_resource 0 0 NA

raw benchmark files