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 20 0.000
fib_recursive 7 891 0.008
fib_iter 8 890 0.009
asdl_generated 4 370 0.010
modules 2 179 0.010
loops 4 287 0.013
scoped_resource 32 1,010 0.031
parse 26 763 0.034
files 8 73 0.106
tuple_return_value 20 185 0.109
containers 15 103 0.147
length 37 206 0.179
cartesian 85 322 0.264
escape 107 347 0.309
cgi 243 510 0.476
varargs 19 12 1.605
control_flow 206 117 1.757

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

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
containers 0 32 0.000
escape 0 12 0.000
fib_iter 0 4 0.000
files 0 4 0.000
loops 0 8 0.000
modules 0 4 0.000
tuple_return_value 0 8 0.000
classes 3 12 0.272
fib_recursive 4 8 0.448
cartesian 4 8 0.510
varargs 46 60 0.770
asdl_generated 7 8 0.939
scoped_resource 16 8 1.978
cgi 8 4 2.000
length 8 4 2.032
parse 4 0 inf
control_flow 0 0 NA

raw benchmark files