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 19 0.000
containers 0 105 0.000
loops 0 287 0.000
fib_iter 8 889 0.008
modules 2 178 0.010
fib_recursive 11 890 0.012
asdl_generated 7 376 0.019
parse 25 768 0.033
scoped_resource 45 1,074 0.042
files 7 81 0.092
tuple_return_value 20 188 0.107
length 45 204 0.220
cartesian 82 326 0.253
cgi 248 508 0.489
escape 283 338 0.838
varargs 20 12 1.632
control_flow 205 103 1.996

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.6 10.9 0.42
parse 3.8 7.6 0.50
cgi 3.5 6.9 0.51
cartesian 3.7 7.1 0.52
fib_iter 3.7 7.1 0.52
scoped_resource 3.5 6.8 0.52
asdl_generated 3.7 6.9 0.53
files 3.7 6.9 0.53
tuple_return_value 3.7 6.9 0.53
loops 3.8 7.1 0.54
escape 3.7 6.8 0.54
control_flow 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
length 3.8 6.8 0.56
modules 3.9 6.8 0.58
containers 28.7 47.8 0.60
varargs 5.6 7.1 0.80

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
fib_iter 0 4 0.000
fib_recursive 0 4 0.000
files 0 4 0.000
length 0 8 0.000
modules 0 4 0.000
tuple_return_value 0 4 0.000
classes 3 12 0.279
control_flow 4 12 0.333
escape 4 12 0.339
parse 4 12 0.349
loops 4 8 0.461
cgi 4 8 0.501
containers 16 31 0.505
varargs 47 60 0.784
scoped_resource 4 4 1.030
cartesian 8 8 1.036
asdl_generated 4 0 inf

raw benchmark files