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 20 0.000
fib_iter 8 899 0.008
modules 2 174 0.010
loops 4 351 0.010
fib_recursive 11 879 0.012
asdl_generated 11 381 0.029
parse 26 771 0.033
scoped_resource 48 1,016 0.047
files 4 69 0.054
tuple_return_value 14 185 0.074
containers 16 122 0.129
length 45 198 0.226
cartesian 86 328 0.261
escape 107 349 0.306
cgi 254 518 0.491
varargs 16 19 0.815
control_flow 208 107 1.940

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
escape 3.5 7.1 0.50
parse 3.8 7.6 0.50
cartesian 3.5 6.9 0.51
cgi 3.5 6.9 0.51
fib_recursive 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
control_flow 3.7 6.9 0.53
files 3.8 7.1 0.54
loops 3.8 7.1 0.54
scoped_resource 3.8 7.1 0.54
fib_iter 3.8 6.9 0.55
length 3.8 6.9 0.55
modules 3.8 6.9 0.55
tuple_return_value 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
asdl_generated 0 4 0.000
cgi 0 4 0.000
containers 0 16 0.000
control_flow 0 8 0.000
escape 0 4 0.000
fib_iter 0 4 0.000
fib_recursive 0 8 0.000
length 0 12 0.000
loops 0 8 0.000
modules 0 8 0.000
scoped_resource 0 4 0.000
classes 3 12 0.277
cartesian 4 12 0.325
files 4 8 0.455
parse 4 8 0.533
tuple_return_value 7 8 0.875
varargs 51 54 0.946

raw benchmark files