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
classes 0 28 0.000
fib_iter 8 887 0.009
modules 2 183 0.010
fib_recursive 11 887 0.012
loops 4 292 0.013
asdl_generated 7 377 0.019
parse 30 766 0.039
scoped_resource 43 1,009 0.043
containers 8 91 0.089
files 8 77 0.099
tuple_return_value 20 186 0.109
length 26 202 0.130
cartesian 86 329 0.261
escape 97 346 0.280
cgi 266 505 0.525
varargs 24 24 0.991
control_flow 207 107 1.930

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
fib_recursive 3.5 6.9 0.51
files 3.5 6.9 0.51
loops 3.7 7.1 0.52
modules 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
fib_iter 3.7 6.9 0.53
asdl_generated 3.7 6.8 0.54
cartesian 3.8 6.9 0.55
control_flow 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
length 3.8 6.8 0.56
containers 28.6 48.0 0.60
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
control_flow 0 8 0.000
fib_iter 0 8 0.000
fib_recursive 0 12 0.000
loops 0 4 0.000
parse 0 16 0.000
tuple_return_value 0 8 0.000
containers 8 48 0.170
scoped_resource 4 16 0.246
asdl_generated 4 8 0.449
cartesian 4 8 0.515
classes 3 4 0.804
varargs 44 49 0.909
cgi 4 4 0.988
escape 8 4 1.925
length 19 8 2.369
files 0 0 NA
modules 0 0 NA

raw benchmark files