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
modules 0 174 0.000
fib_recursive 7 873 0.008
fib_iter 8 897 0.008
loops 4 322 0.012
asdl_generated 11 387 0.029
parse 25 771 0.033
containers 4 116 0.034
scoped_resource 48 1,050 0.045
tuple_return_value 14 183 0.074
files 8 76 0.099
length 42 216 0.194
cartesian 88 337 0.261
escape 100 357 0.279
cgi 264 502 0.525
varargs 28 20 1.405
control_flow 211 106 1.996

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
escape 3.5 6.8 0.52
loops 3.8 7.2 0.53
asdl_generated 3.7 6.9 0.53
cartesian 3.7 6.9 0.53
cgi 3.7 6.9 0.53
fib_iter 3.7 6.9 0.53
scoped_resource 3.8 7.1 0.54
fib_recursive 3.8 6.9 0.55
files 3.8 6.9 0.55
length 3.8 6.9 0.55
modules 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
tuple_return_value 3.9 6.9 0.57
containers 28.7 47.8 0.60
varargs 5.4 6.8 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
control_flow 0 8 0.000
fib_iter 0 4 0.000
scoped_resource 0 12 0.000
modules 2 8 0.232
cgi 4 12 0.334
classes 3 8 0.407
fib_recursive 4 8 0.449
cartesian 4 8 0.497
tuple_return_value 7 12 0.568
containers 12 20 0.585
varargs 36 52 0.695
length 4 4 1.049
parse 4 4 1.061
escape 8 0 inf
asdl_generated 0 0 NA
files 0 0 NA
loops 0 0 NA

raw benchmark files