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
containers 0 101 0.000
fib_iter 7 891 0.008
modules 2 173 0.010
fib_recursive 11 875 0.012
loops 4 286 0.013
asdl_generated 7 368 0.019
parse 25 771 0.033
scoped_resource 47 1,022 0.046
tuple_return_value 20 186 0.108
files 8 68 0.112
classes 3 22 0.145
length 41 201 0.205
cartesian 79 334 0.235
escape 102 345 0.296
cgi 263 517 0.508
varargs 12 20 0.633
control_flow 210 103 2.047

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
cgi 3.5 7.1 0.50
parse 3.8 7.5 0.51
scoped_resource 3.8 7.2 0.53
asdl_generated 3.7 6.9 0.53
cartesian 3.7 6.9 0.53
escape 3.7 6.9 0.53
fib_iter 3.7 6.9 0.53
length 3.7 6.9 0.53
files 3.8 7.1 0.54
loops 3.8 7.1 0.54
fib_recursive 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
modules 3.9 6.9 0.57
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
classes 0 9 0.000
control_flow 0 12 0.000
fib_iter 0 4 0.000
fib_recursive 0 8 0.000
files 0 8 0.000
loops 0 8 0.000
modules 0 8 0.000
scoped_resource 0 12 0.000
tuple_return_value 0 8 0.000
asdl_generated 4 8 0.446
parse 4 8 0.456
length 4 8 0.475
containers 16 32 0.489
escape 4 8 0.510
varargs 54 51 1.055
cartesian 12 8 1.466
cgi 4 0 inf

raw benchmark files