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 4 1,018 0.004
modules 2 170 0.010
loops 4 332 0.011
fib_recursive 11 873 0.012
asdl_generated 7 376 0.019
parse 29 766 0.038
scoped_resource 43 1,040 0.041
files 4 69 0.056
tuple_return_value 20 195 0.103
classes 3 31 0.104
containers 14 113 0.126
length 36 200 0.180
cartesian 78 352 0.222
escape 107 340 0.315
cgi 265 518 0.512
varargs 25 20 1.214
control_flow 213 110 1.929

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.7 0.40
cartesian 3.5 7.1 0.50
parse 3.8 7.5 0.51
cgi 3.5 6.9 0.51
escape 3.5 6.9 0.51
scoped_resource 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
length 3.7 6.9 0.53
fib_iter 3.8 7.1 0.54
files 3.8 7.1 0.54
loops 3.8 7.1 0.54
control_flow 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
modules 3.9 6.9 0.57
containers 28.9 47.8 0.60
varargs 5.6 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cgi 0 8 0.000
containers 0 24 0.000
control_flow 0 4 0.000
escape 0 12 0.000
fib_recursive 0 12 0.000
loops 0 4 0.000
modules 0 12 0.000
parse 0 4 0.000
tuple_return_value 0 8 0.000
asdl_generated 4 8 0.447
files 4 8 0.501
varargs 41 53 0.778
length 8 8 0.999
cartesian 12 0 inf
fib_iter 4 0 inf
scoped_resource 4 0 inf
classes 0 0 NA

raw benchmark files