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 283 0.000
fib_iter 8 889 0.009
modules 2 184 0.010
fib_recursive 11 889 0.012
asdl_generated 11 373 0.029
parse 26 770 0.034
scoped_resource 44 1,021 0.043
tuple_return_value 13 186 0.072
containers 11 117 0.098
files 7 74 0.100
classes 3 22 0.147
length 45 207 0.216
cartesian 86 327 0.264
escape 102 351 0.292
cgi 250 502 0.499
varargs 24 36 0.662
control_flow 208 106 1.951

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

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 12 0.000
fib_iter 0 4 0.000
fib_recursive 0 4 0.000
files 0 8 0.000
modules 0 4 0.000
containers 4 20 0.190
loops 4 12 0.304
escape 4 12 0.329
scoped_resource 4 12 0.333
cgi 4 12 0.338
parse 4 8 0.462
tuple_return_value 7 8 0.848
cartesian 4 4 0.985
varargs 44 36 1.214
length 0 0 NA

raw benchmark files