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
modules 0 179 0.000
fib_iter 8 890 0.009
fib_recursive 11 878 0.012
loops 4 290 0.013
asdl_generated 7 368 0.020
parse 29 769 0.038
scoped_resource 43 1,030 0.042
files 4 67 0.057
containers 8 110 0.070
tuple_return_value 16 189 0.085
classes 3 19 0.173
length 41 201 0.205
cartesian 85 349 0.242
escape 98 344 0.286
varargs 12 32 0.387
cgi 262 512 0.512
control_flow 210 114 1.833

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.7 0.43
parse 3.8 7.6 0.50
length 3.5 6.9 0.51
fib_iter 3.7 7.1 0.52
modules 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
cartesian 3.7 6.9 0.53
cgi 3.7 6.9 0.53
escape 3.7 6.9 0.53
loops 3.8 7.1 0.54
asdl_generated 3.7 6.8 0.54
control_flow 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
files 3.9 6.9 0.57
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 11 0.000
control_flow 0 4 0.000
fib_iter 0 8 0.000
fib_recursive 0 4 0.000
loops 0 4 0.000
parse 0 8 0.000
modules 2 8 0.225
containers 8 24 0.326
files 4 8 0.452
asdl_generated 4 8 0.462
length 4 8 0.512
scoped_resource 4 4 0.976
cgi 4 4 0.994
tuple_return_value 4 4 0.995
cartesian 4 4 1.003
varargs 54 40 1.342
escape 8 4 2.050

raw benchmark files