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 8 888 0.009
modules 2 181 0.010
fib_recursive 11 879 0.012
loops 4 292 0.013
asdl_generated 11 375 0.029
parse 30 792 0.037
scoped_resource 43 1,032 0.042
files 4 76 0.049
tuple_return_value 20 187 0.108
classes 3 27 0.122
containers 16 115 0.138
length 45 209 0.213
cartesian 74 327 0.226
escape 109 354 0.308
cgi 259 513 0.505
varargs 24 20 1.171
control_flow 210 106 1.972

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
length 3.5 7.1 0.50
parse 3.8 7.6 0.50
cartesian 3.5 6.9 0.51
asdl_generated 3.7 6.9 0.53
cgi 3.7 6.9 0.53
escape 3.7 6.9 0.53
fib_iter 3.7 6.9 0.53
scoped_resource 3.7 6.9 0.53
files 3.8 7.1 0.54
loops 3.8 7.1 0.54
fib_recursive 3.8 6.9 0.55
modules 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
containers 28.6 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 4 0.000
containers 0 24 0.000
control_flow 0 8 0.000
escape 0 8 0.000
fib_iter 0 8 0.000
fib_recursive 0 8 0.000
loops 0 4 0.000
modules 0 4 0.000
parse 0 4 0.000
tuple_return_value 0 8 0.000
varargs 43 52 0.826
scoped_resource 4 4 0.974
cgi 4 4 1.003
cartesian 16 8 2.055
files 4 0 inf
length 0 0 NA

raw benchmark files