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_recursive 7 890 0.008
fib_iter 8 891 0.009
modules 2 180 0.010
loops 4 295 0.013
asdl_generated 7 374 0.019
parse 26 772 0.033
scoped_resource 47 1,038 0.045
containers 8 117 0.067
tuple_return_value 20 186 0.109
files 8 69 0.112
classes 3 19 0.165
length 40 223 0.180
cartesian 87 329 0.266
escape 106 343 0.309
cgi 264 509 0.520
varargs 25 24 1.034
control_flow 222 108 2.056

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.6 10.5 0.44
fib_recursive 3.5 7.1 0.50
parse 3.8 7.5 0.51
cgi 3.5 6.9 0.51
scoped_resource 3.7 7.1 0.52
escape 3.5 6.8 0.52
cartesian 3.7 6.9 0.53
modules 3.7 6.9 0.53
files 3.8 7.1 0.54
loops 3.8 7.1 0.54
asdl_generated 3.7 6.8 0.54
control_flow 3.8 6.9 0.55
fib_iter 3.8 6.9 0.55
length 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
containers 28.4 47.7 0.60
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
classes 0 12 0.000
control_flow 0 8 0.000
fib_iter 0 8 0.000
files 0 8 0.000
loops 0 8 0.000
modules 0 4 0.000
tuple_return_value 0 8 0.000
cartesian 4 12 0.334
parse 4 12 0.354
containers 8 20 0.387
asdl_generated 4 8 0.457
cgi 4 8 0.493
escape 4 8 0.512
varargs 42 48 0.862
fib_recursive 4 4 0.916
length 4 4 1.006
scoped_resource 0 0 NA

raw benchmark files