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
fib_iter 8 885 0.008
loops 4 368 0.010
modules 2 176 0.010
fib_recursive 11 881 0.012
asdl_generated 11 377 0.028
parse 25 752 0.034
scoped_resource 44 1,020 0.043
containers 8 97 0.080
tuple_return_value 20 187 0.108
files 7 68 0.109
length 37 215 0.174
cartesian 86 327 0.264
escape 106 345 0.308
cgi 261 513 0.510
varargs 17 28 0.594
control_flow 211 112 1.877

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
escape 3.5 7.1 0.50
modules 3.5 7.1 0.50
parse 3.8 7.6 0.50
cgi 3.5 6.9 0.51
fib_iter 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
cartesian 3.7 6.9 0.53
fib_recursive 3.8 7.1 0.54
loops 3.8 7.1 0.54
tuple_return_value 3.8 7.1 0.54
files 3.8 6.9 0.55
scoped_resource 3.8 6.9 0.55
control_flow 3.9 7.1 0.56
length 3.9 6.9 0.57
containers 28.6 48.0 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
escape 0 4 0.000
fib_iter 0 8 0.000
fib_recursive 0 4 0.000
files 0 8 0.000
modules 0 8 0.000
tuple_return_value 0 4 0.000
containers 8 37 0.212
classes 3 12 0.273
scoped_resource 4 12 0.332
cartesian 4 8 0.493
parse 4 8 0.528
varargs 50 44 1.133
cgi 8 0 inf
length 7 0 inf
control_flow 0 0 NA
loops 0 0 NA

raw benchmark files