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 285 0.000
fib_iter 8 900 0.009
modules 2 176 0.010
fib_recursive 11 883 0.012
asdl_generated 11 377 0.029
containers 4 124 0.031
parse 29 788 0.037
scoped_resource 43 1,046 0.041
tuple_return_value 20 197 0.102
files 7 72 0.105
classes 3 22 0.145
length 45 202 0.222
cartesian 78 330 0.235
escape 101 346 0.291
cgi 262 507 0.516
control_flow 202 107 1.892
varargs 20 4 5.056

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.6 0.42
parse 3.8 7.6 0.50
escape 3.5 6.9 0.51
fib_iter 3.5 6.9 0.51
scoped_resource 3.5 6.9 0.51
cartesian 3.7 7.1 0.52
asdl_generated 3.5 6.8 0.52
cgi 3.7 6.9 0.53
length 3.7 6.9 0.53
control_flow 3.8 7.1 0.54
loops 3.8 7.1 0.54
modules 3.8 7.1 0.54
fib_recursive 3.8 6.9 0.55
files 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
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
asdl_generated 0 4 0.000
classes 0 9 0.000
fib_recursive 0 8 0.000
files 0 4 0.000
length 0 8 0.000
modules 0 8 0.000
parse 0 4 0.000
tuple_return_value 0 4 0.000
loops 4 12 0.306
control_flow 4 8 0.501
escape 4 8 0.507
varargs 49 68 0.714
cartesian 12 16 0.730
containers 12 12 0.959
scoped_resource 4 4 0.972
cgi 4 4 1.007
fib_iter 0 0 NA

raw benchmark files