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 286 0.000
fib_iter 4 892 0.004
modules 2 176 0.010
fib_recursive 11 966 0.011
asdl_generated 7 380 0.020
parse 30 743 0.040
scoped_resource 48 1,027 0.046
containers 8 116 0.069
tuple_return_value 20 196 0.103
files 8 67 0.111
classes 3 26 0.122
length 41 204 0.202
cartesian 85 326 0.261
escape 98 348 0.281
cgi 261 499 0.522
varargs 17 12 1.374
control_flow 207 101 2.043

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

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
classes 0 4 0.000
control_flow 0 12 0.000
fib_recursive 0 4 0.000
files 0 8 0.000
modules 0 8 0.000
parse 0 16 0.000
scoped_resource 0 12 0.000
tuple_return_value 0 4 0.000
containers 8 20 0.399
loops 4 8 0.458
length 4 8 0.468
cgi 8 12 0.660
varargs 50 60 0.825
asdl_generated 4 4 0.927
fib_iter 4 4 0.956
cartesian 8 4 2.012
escape 8 4 2.039

raw benchmark files