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 884 0.004
modules 2 190 0.009
fib_recursive 11 888 0.012
loops 4 282 0.013
parse 19 774 0.024
asdl_generated 11 387 0.028
scoped_resource 44 1,061 0.041
containers 8 103 0.074
files 7 72 0.103
tuple_return_value 20 189 0.106
classes 3 27 0.118
length 36 202 0.178
cartesian 83 333 0.249
escape 98 349 0.281
varargs 8 16 0.494
cgi 261 504 0.517
control_flow 210 113 1.861

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
cartesian 3.5 6.9 0.51
cgi 3.5 6.9 0.51
escape 3.5 6.9 0.51
parse 3.9 7.6 0.52
asdl_generated 3.7 6.9 0.53
files 3.7 6.9 0.53
modules 3.7 6.9 0.53
loops 3.8 7.1 0.54
scoped_resource 3.8 7.1 0.54
fib_iter 3.7 6.8 0.54
fib_recursive 3.8 6.9 0.55
length 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
control_flow 3.9 6.8 0.58
containers 28.5 47.7 0.60
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 4 0.000
classes 0 4 0.000
control_flow 0 4 0.000
fib_recursive 0 12 0.000
files 0 4 0.000
loops 0 12 0.000
tuple_return_value 0 4 0.000
containers 8 32 0.242
fib_iter 4 12 0.314
scoped_resource 4 8 0.494
cgi 8 8 0.988
length 8 8 0.989
varargs 59 56 1.059
parse 11 8 1.391
cartesian 8 4 1.972
escape 8 4 2.038
modules 0 0 NA

raw benchmark files