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 290 0.000
fib_iter 4 895 0.004
fib_recursive 7 892 0.008
modules 2 174 0.010
parse 19 766 0.024
asdl_generated 11 370 0.029
containers 4 120 0.032
scoped_resource 48 1,027 0.046
files 4 73 0.052
tuple_return_value 20 181 0.110
classes 3 22 0.148
length 45 207 0.216
cartesian 86 330 0.261
escape 103 351 0.294
varargs 4 8 0.487
cgi 265 515 0.515
control_flow 204 112 1.822

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.8 0.40
parse 3.7 7.6 0.48
escape 3.5 6.9 0.51
cartesian 3.7 7.1 0.52
control_flow 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
cgi 3.7 6.9 0.53
fib_iter 3.7 6.9 0.53
modules 3.7 6.9 0.53
tuple_return_value 3.7 6.9 0.53
loops 3.8 7.1 0.54
fib_recursive 3.8 6.9 0.55
files 3.8 6.8 0.56
length 3.9 6.9 0.57
containers 28.6 47.6 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 12 0.000
classes 0 9 0.000
length 0 8 0.000
modules 0 8 0.000
scoped_resource 0 4 0.000
tuple_return_value 0 12 0.000
loops 4 12 0.317
fib_iter 4 8 0.471
cartesian 4 8 0.509
containers 12 16 0.717
fib_recursive 4 4 0.901
files 4 4 0.927
varargs 62 64 0.974
escape 4 4 0.995
control_flow 4 4 1.000
parse 11 8 1.390
cgi 0 0 NA

raw benchmark files