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 24 0.000
varargs 0 16 0.000
fib_iter 4 891 0.004
modules 2 184 0.010
fib_recursive 11 898 0.012
loops 4 285 0.013
asdl_generated 11 372 0.029
containers 4 102 0.037
parse 29 778 0.038
scoped_resource 48 1,013 0.047
files 7 73 0.102
tuple_return_value 20 181 0.111
length 36 204 0.176
cartesian 82 328 0.251
escape 95 338 0.281
cgi 268 506 0.530
control_flow 208 108 1.934

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
scoped_resource 3.5 7.1 0.50
asdl_generated 3.5 6.9 0.51
cgi 3.5 6.9 0.51
escape 3.7 6.9 0.53
fib_iter 3.7 6.9 0.53
loops 3.8 7.1 0.54
modules 3.8 7.1 0.54
cartesian 3.7 6.8 0.54
control_flow 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
files 3.8 6.9 0.55
length 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
containers 28.6 47.8 0.60
varargs 5.6 7.1 0.80

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 8 0.000
cgi 0 12 0.000
control_flow 0 4 0.000
fib_recursive 0 4 0.000
files 0 4 0.000
loops 0 8 0.000
parse 0 4 0.000
scoped_resource 0 12 0.000
tuple_return_value 0 12 0.000
containers 11 35 0.318
classes 3 8 0.402
fib_iter 4 8 0.473
escape 12 12 0.996
varargs 66 56 1.191
cartesian 8 4 1.959
length 8 4 1.993
modules 0 0 NA

raw benchmark files