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 23 0.000
fib_iter 4 882 0.004
modules 2 178 0.010
fib_recursive 11 920 0.012
loops 4 297 0.013
parse 21 772 0.027
asdl_generated 11 388 0.028
scoped_resource 44 1,017 0.043
files 4 73 0.051
containers 8 110 0.070
tuple_return_value 16 184 0.088
length 37 213 0.172
cartesian 90 333 0.271
escape 104 349 0.297
varargs 17 33 0.497
cgi 259 504 0.514
control_flow 208 104 2.001

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.7 0.49
asdl_generated 3.5 6.9 0.51
cgi 3.5 6.9 0.51
escape 3.5 6.9 0.51
cartesian 3.7 7.1 0.52
loops 3.7 7.1 0.52
modules 3.7 7.1 0.52
fib_recursive 3.8 7.1 0.54
length 3.8 7.1 0.54
scoped_resource 3.8 7.1 0.54
files 3.7 6.8 0.54
fib_iter 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
containers 28.5 47.6 0.60
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
control_flow 0 12 0.000
fib_recursive 0 8 0.000
loops 0 4 0.000
modules 0 4 0.000
fib_iter 4 12 0.316
containers 8 24 0.324
classes 3 8 0.422
escape 4 8 0.503
tuple_return_value 4 8 0.503
cgi 8 12 0.670
files 4 4 0.919
cartesian 4 4 0.978
scoped_resource 4 4 0.988
parse 8 8 1.051
varargs 50 38 1.324
length 8 0 inf
asdl_generated 0 0 NA

raw benchmark files