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
fib_iter 5 647 0.008
modules 1 124 0.008
loops 2 212 0.012
fib_recursive 7 640 0.012
scoped_resource 7 555 0.012
asdl_generated 3 275 0.013
parse 20 552 0.037
tuple_return_value 10 137 0.074
files 5 47 0.102
containers 10 85 0.123
classes 2 15 0.131
length 30 140 0.214
varargs 4 17 0.228
cartesian 61 233 0.262
escape 74 248 0.300
cgi 177 357 0.497
control_flow 148 76 1.957

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.6 11.0 0.42
parse 3.9 7.7 0.50
escape 3.7 7.2 0.51
asdl_generated 3.7 7.1 0.52
scoped_resource 3.7 7.2 0.52
length 3.8 7.2 0.53
loops 3.8 7.2 0.53
modules 3.8 7.1 0.53
fib_recursive 3.8 7.1 0.53
cgi 3.8 7.0 0.53
files 3.8 7.1 0.54
cartesian 3.8 7.1 0.54
fib_iter 3.9 7.2 0.54
tuple_return_value 3.8 7.1 0.54
control_flow 3.9 7.1 0.55
containers 28.5 47.9 0.60
varargs 5.7 7.1 0.80

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cartesian 0 8 0.000
cgi 0 4 0.000
classes 0 4 0.000
containers 0 8 0.000
control_flow 0 4 0.000
files 0 8 0.000
length 0 8 0.000
loops 0 4 0.000
modules 0 8 0.000
parse 0 4 0.000
varargs 23 13 1.827
asdl_generated 3 0 inf
tuple_return_value 3 0 inf
escape 0 0 NA
fib_iter 0 0 NA
fib_recursive 0 0 NA
scoped_resource 0 0 NA

raw benchmark files