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 23 0.000
files 0 64 0.000
fib_iter 4 895 0.004
modules 2 175 0.010
fib_recursive 11 885 0.012
loops 4 282 0.013
asdl_generated 11 389 0.028
parse 29 786 0.037
scoped_resource 42 1,032 0.041
containers 11 120 0.095
tuple_return_value 21 184 0.114
length 37 203 0.184
cartesian 71 325 0.219
escape 99 351 0.281
cgi 245 508 0.482
varargs 25 24 1.023
control_flow 209 104 2.017

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.8 0.41
fib_iter 3.5 7.1 0.50
parse 3.9 7.6 0.52
cgi 3.7 7.1 0.52
escape 3.7 7.1 0.52
length 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
cartesian 3.7 6.9 0.53
files 3.7 6.9 0.53
tuple_return_value 3.7 6.9 0.53
loops 3.8 7.1 0.54
scoped_resource 3.8 7.1 0.54
modules 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
fib_recursive 3.9 6.9 0.57
containers 28.5 47.8 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 8 0.000
control_flow 0 12 0.000
loops 0 20 0.000
modules 0 8 0.000
parse 0 4 0.000
tuple_return_value 0 12 0.000
containers 4 16 0.238
scoped_resource 4 12 0.354
classes 3 8 0.413
files 7 12 0.626
varargs 41 48 0.852
length 7 8 0.938
fib_iter 4 4 0.956
cartesian 20 12 1.645
cgi 8 4 2.008
escape 8 4 2.062
fib_recursive 0 0 NA

raw benchmark files