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
loops 0 294 0.000
fib_iter 4 880 0.004
modules 2 179 0.010
fib_recursive 11 956 0.011
asdl_generated 11 373 0.029
containers 4 116 0.034
parse 27 767 0.035
scoped_resource 48 1,059 0.045
files 7 76 0.098
tuple_return_value 20 184 0.110
classes 3 22 0.151
length 44 198 0.222
cartesian 78 335 0.234
escape 95 347 0.273
cgi 262 509 0.516
varargs 21 17 1.235
control_flow 207 111 1.874

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.6 0.42
parse 3.8 7.6 0.50
cgi 3.7 7.1 0.52
escape 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
cartesian 3.7 6.9 0.53
fib_recursive 3.7 6.9 0.53
length 3.7 6.9 0.53
loops 3.8 7.1 0.54
scoped_resource 3.8 7.1 0.54
control_flow 3.8 6.9 0.55
fib_iter 3.8 6.9 0.55
files 3.8 6.9 0.55
modules 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
containers 28.6 47.8 0.60
varargs 5.4 6.9 0.77

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 8 0.000
classes 0 9 0.000
control_flow 0 4 0.000
fib_recursive 0 4 0.000
length 0 8 0.000
modules 0 4 0.000
scoped_resource 0 12 0.000
tuple_return_value 0 8 0.000
fib_iter 4 8 0.472
parse 4 8 0.482
containers 12 20 0.588
varargs 45 54 0.836
loops 4 4 0.912
cgi 4 4 0.992
escape 12 4 2.931
cartesian 12 4 3.100
files 0 0 NA

raw benchmark files