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
fib_iter 4 897 0.004
modules 2 179 0.010
loops 4 293 0.012
fib_recursive 11 881 0.013
parse 22 757 0.030
asdl_generated 11 378 0.030
containers 4 112 0.035
scoped_resource 44 1,029 0.042
files 7 72 0.103
tuple_return_value 20 191 0.105
classes 3 24 0.135
length 44 208 0.211
cartesian 91 324 0.281
escape 102 346 0.295
cgi 268 508 0.528
control_flow 205 106 1.932
varargs 17 8 2.105

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
asdl_generated 3.5 6.9 0.51
cgi 3.5 6.9 0.51
parse 3.9 7.6 0.52
escape 3.7 7.1 0.52
loops 3.8 7.2 0.53
cartesian 3.7 6.9 0.53
fib_iter 3.7 6.9 0.53
fib_recursive 3.7 6.9 0.53
length 3.8 7.1 0.54
control_flow 3.8 6.9 0.55
files 3.8 6.9 0.55
modules 3.8 6.9 0.55
scoped_resource 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
containers 28.5 47.7 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
cartesian 0 8 0.000
cgi 0 8 0.000
classes 0 8 0.000
fib_recursive 0 12 0.000
files 0 4 0.000
length 0 4 0.000
loops 0 4 0.000
modules 0 4 0.000
fib_iter 4 8 0.474
control_flow 4 8 0.483
containers 12 24 0.489
scoped_resource 4 8 0.498
escape 4 8 0.508
parse 7 12 0.624
varargs 50 64 0.789
tuple_return_value 0 0 NA

raw benchmark files