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 30 0.000
fib_iter 8 888 0.009
modules 2 179 0.010
fib_recursive 11 914 0.012
loops 4 305 0.012
asdl_generated 7 375 0.019
containers 4 120 0.032
scoped_resource 39 1,005 0.039
parse 30 778 0.039
files 7 73 0.101
tuple_return_value 20 189 0.106
length 44 208 0.211
cartesian 79 333 0.237
escape 99 347 0.286
cgi 269 510 0.527
varargs 17 28 0.595
control_flow 210 117 1.790

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

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cgi 0 4 0.000
fib_iter 0 4 0.000
fib_recursive 0 8 0.000
files 0 4 0.000
length 0 4 0.000
loops 0 8 0.000
modules 0 4 0.000
parse 0 4 0.000
tuple_return_value 0 4 0.000
scoped_resource 9 16 0.539
containers 12 16 0.722
asdl_generated 4 4 0.905
escape 8 8 0.994
varargs 50 44 1.135
cartesian 12 4 2.952
classes 3 0 inf
control_flow 0 0 NA

raw benchmark files