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 19 0.000
modules 2 183 0.010
fib_iter 9 895 0.010
fib_recursive 11 876 0.012
loops 4 289 0.013
asdl_generated 7 375 0.019
parse 25 774 0.032
scoped_resource 35 1,031 0.034
containers 8 115 0.066
files 7 73 0.102
tuple_return_value 20 179 0.112
length 41 206 0.198
cartesian 88 336 0.263
escape 102 354 0.289
cgi 262 523 0.501
varargs 20 24 0.818
control_flow 203 103 1.960

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.9 0.41
parse 3.8 7.5 0.51
cartesian 3.5 6.9 0.51
escape 3.5 6.9 0.51
scoped_resource 3.7 7.1 0.52
loops 3.8 7.2 0.53
asdl_generated 3.7 6.9 0.53
cgi 3.7 6.9 0.53
length 3.7 6.9 0.53
files 3.8 7.1 0.54
fib_iter 3.7 6.8 0.54
control_flow 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
modules 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
containers 28.6 47.8 0.60
varargs 5.5 7.1 0.78

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
fib_recursive 0 8 0.000
files 0 4 0.000
loops 0 4 0.000
modules 0 8 0.000
tuple_return_value 0 12 0.000
parse 4 16 0.262
classes 3 11 0.288
escape 4 12 0.329
control_flow 4 12 0.333
containers 8 20 0.384
length 4 8 0.514
asdl_generated 4 4 0.905
varargs 47 48 0.981
scoped_resource 12 8 1.474
cartesian 4 0 inf
cgi 8 0 inf
fib_iter 0 0 NA

raw benchmark files