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 4 928 0.004
modules 2 174 0.010
fib_recursive 11 897 0.012
loops 4 286 0.013
asdl_generated 11 378 0.028
parse 26 774 0.033
scoped_resource 48 1,028 0.046
files 4 78 0.047
tuple_return_value 16 192 0.084
classes 3 27 0.121
containers 12 95 0.122
cartesian 69 334 0.206
length 44 212 0.208
escape 102 348 0.294
cgi 264 506 0.522
varargs 16 16 0.982
control_flow 206 108 1.915

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
asdl_generated 3.5 7.1 0.50
cgi 3.5 7.1 0.50
loops 3.7 7.2 0.51
scoped_resource 3.7 7.2 0.51
escape 3.5 6.9 0.51
parse 3.9 7.6 0.52
cartesian 3.7 6.9 0.53
length 3.7 6.9 0.53
fib_recursive 3.8 7.1 0.54
files 3.8 7.1 0.54
control_flow 3.8 6.9 0.55
fib_iter 3.8 6.9 0.55
modules 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
containers 28.7 47.7 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 4 0.000
classes 0 4 0.000
control_flow 0 8 0.000
loops 0 12 0.000
modules 0 12 0.000
scoped_resource 0 16 0.000
containers 4 40 0.098
fib_iter 4 12 0.315
cgi 4 8 0.498
escape 4 8 0.512
parse 4 8 0.532
varargs 51 56 0.912
tuple_return_value 4 4 1.009
cartesian 20 8 2.546
files 4 0 inf
fib_recursive 0 0 NA
length 0 0 NA

raw benchmark files