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
files 0 72 0.000
fib_iter 4 892 0.004
fib_recursive 7 898 0.008
modules 2 193 0.010
loops 4 295 0.012
asdl_generated 11 370 0.029
containers 4 125 0.032
parse 26 768 0.034
scoped_resource 44 1,026 0.043
tuple_return_value 16 189 0.086
length 33 201 0.162
classes 3 18 0.183
cartesian 86 324 0.266
escape 98 360 0.271
cgi 269 514 0.523
varargs 20 28 0.690
control_flow 204 103 1.983

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.6 0.50
cartesian 3.5 6.9 0.51
cgi 3.5 6.9 0.51
escape 3.5 6.9 0.51
fib_recursive 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
control_flow 3.8 6.9 0.55
length 3.8 6.9 0.55
modules 3.8 6.9 0.55
loops 3.9 7.1 0.56
files 3.8 6.8 0.56
fib_iter 3.9 6.9 0.57
tuple_return_value 3.9 6.9 0.57
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 8 0.000
classes 0 13 0.000
loops 0 8 0.000
modules 0 16 0.000
fib_recursive 4 12 0.302
parse 4 12 0.312
control_flow 4 12 0.337
fib_iter 4 8 0.476
scoped_resource 4 8 0.498
cartesian 4 8 0.513
tuple_return_value 4 8 0.513
containers 12 12 0.979
escape 8 8 1.017
varargs 47 44 1.053
length 12 8 1.554
files 7 4 1.823
cgi 0 0 NA

raw benchmark files