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 887 0.004
modules 2 171 0.010
fib_recursive 11 880 0.012
loops 4 285 0.013
asdl_generated 5 372 0.014
parse 26 760 0.034
containers 4 104 0.037
scoped_resource 47 1,015 0.047
tuple_return_value 16 189 0.085
files 8 73 0.104
length 36 257 0.140
classes 3 19 0.168
cartesian 90 324 0.279
escape 106 346 0.306
cgi 276 513 0.539
control_flow 208 109 1.919
varargs 23 8 2.919

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.3 10.6 0.41
parse 3.8 7.6 0.50
length 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
cartesian 3.7 6.9 0.53
cgi 3.7 6.9 0.53
escape 3.7 6.9 0.53
fib_iter 3.7 6.9 0.53
modules 3.7 6.9 0.53
loops 3.8 7.1 0.54
scoped_resource 3.8 7.1 0.54
control_flow 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
files 3.8 6.9 0.55
tuple_return_value 3.8 6.7 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
cartesian 0 8 0.000
classes 0 11 0.000
control_flow 0 8 0.000
escape 0 4 0.000
fib_recursive 0 8 0.000
files 0 4 0.000
loops 0 12 0.000
modules 0 12 0.000
scoped_resource 0 12 0.000
fib_iter 4 12 0.314
containers 12 32 0.359
tuple_return_value 4 8 0.499
varargs 43 64 0.669
parse 4 4 1.063
asdl_generated 5 4 1.342
length 8 4 1.985
cgi 4 0 inf

raw benchmark files