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 19 0.000
modules 0 187 0.000
fib_iter 8 893 0.009
fib_recursive 11 937 0.012
loops 4 285 0.013
asdl_generated 7 382 0.019
parse 23 757 0.030
scoped_resource 47 1,034 0.045
tuple_return_value 10 192 0.053
containers 10 105 0.098
files 7 69 0.108
length 44 201 0.218
cartesian 89 325 0.274
escape 107 353 0.302
cgi 269 505 0.532
varargs 20 16 1.292
control_flow 207 111 1.864

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

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cgi 0 4 0.000
control_flow 0 4 0.000
fib_iter 0 8 0.000
fib_recursive 0 4 0.000
files 0 8 0.000
length 0 12 0.000
loops 0 12 0.000
scoped_resource 0 12 0.000
containers 5 32 0.160
classes 3 12 0.282
cartesian 4 12 0.326
modules 2 4 0.455
parse 8 16 0.471
varargs 45 56 0.812
asdl_generated 4 4 0.899
tuple_return_value 10 4 2.526
escape 0 0 NA

raw benchmark files