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
files 0 72 0.000
fib_iter 8 887 0.009
modules 2 178 0.010
fib_recursive 11 893 0.012
loops 4 285 0.013
asdl_generated 11 373 0.029
parse 29 765 0.039
scoped_resource 47 1,021 0.046
containers 8 106 0.075
tuple_return_value 16 184 0.088
classes 3 26 0.123
length 45 199 0.226
cartesian 90 330 0.274
escape 106 341 0.312
cgi 264 511 0.517
varargs 23 20 1.172
control_flow 206 105 1.963

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

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 12 0.000
classes 0 4 0.000
escape 0 12 0.000
fib_iter 0 4 0.000
fib_recursive 0 4 0.000
length 0 12 0.000
loops 0 8 0.000
modules 0 4 0.000
parse 0 16 0.000
scoped_resource 0 4 0.000
containers 8 27 0.290
control_flow 4 8 0.491
cgi 4 8 0.502
tuple_return_value 4 8 0.504
varargs 43 52 0.826
files 7 4 1.826
cartesian 0 0 NA

raw benchmark files