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 31 0.000
containers 0 110 0.000
fib_recursive 7 889 0.008
fib_iter 8 897 0.008
modules 2 179 0.010
loops 4 290 0.013
asdl_generated 11 375 0.030
parse 29 756 0.039
scoped_resource 47 1,025 0.046
tuple_return_value 20 190 0.106
files 7 67 0.110
length 41 203 0.200
cartesian 83 325 0.254
escape 106 348 0.306
cgi 266 512 0.519
varargs 16 24 0.649
control_flow 207 110 1.872

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.6 0.43
parse 3.8 7.5 0.51
cgi 3.5 6.9 0.51
escape 3.5 6.9 0.51
asdl_generated 3.7 7.1 0.52
fib_recursive 3.7 7.1 0.52
length 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
cartesian 3.7 6.9 0.53
modules 3.7 6.9 0.53
fib_iter 3.8 7.1 0.54
loops 3.8 7.1 0.54
control_flow 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
files 3.9 6.9 0.57
containers 28.4 47.8 0.59
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 8 0.000
escape 0 8 0.000
files 0 8 0.000
loops 0 4 0.000
modules 0 4 0.000
parse 0 12 0.000
scoped_resource 0 12 0.000
tuple_return_value 0 8 0.000
cgi 4 8 0.503
length 4 8 0.510
containers 15 27 0.556
fib_recursive 4 4 0.894
cartesian 8 8 0.993
control_flow 4 4 1.008
varargs 51 48 1.055
classes 3 0 inf
fib_iter 0 0 NA

raw benchmark files