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 297 0.000
fib_iter 8 922 0.008
modules 2 177 0.010
fib_recursive 11 880 0.012
asdl_generated 11 378 0.029
parse 26 767 0.034
scoped_resource 47 1,043 0.045
tuple_return_value 16 183 0.088
containers 12 106 0.110
files 8 68 0.113
classes 3 23 0.141
cartesian 74 352 0.209
length 45 203 0.223
escape 102 347 0.295
cgi 268 515 0.522
control_flow 207 110 1.883
varargs 16 8 1.976

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.7 0.41
parse 3.8 7.6 0.50
scoped_resource 3.5 7.1 0.50
asdl_generated 3.5 6.9 0.51
cartesian 3.5 6.9 0.51
tuple_return_value 3.5 6.9 0.51
loops 3.8 7.2 0.53
cgi 3.7 6.9 0.53
escape 3.7 6.9 0.53
files 3.7 6.9 0.53
length 3.7 6.9 0.53
control_flow 3.8 7.1 0.54
fib_iter 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
modules 3.8 6.9 0.55
containers 28.5 47.8 0.60
varargs 5.6 7.1 0.80

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 8 0.000
cgi 0 4 0.000
classes 0 8 0.000
control_flow 0 4 0.000
fib_iter 0 8 0.000
fib_recursive 0 4 0.000
files 0 8 0.000
length 0 8 0.000
modules 0 8 0.000
scoped_resource 0 4 0.000
containers 4 27 0.141
parse 4 8 0.465
tuple_return_value 4 8 0.496
varargs 51 63 0.803
loops 4 4 0.927
cartesian 16 8 2.046
escape 4 0 inf

raw benchmark files