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 14 0.000
loops 0 295 0.000
fib_iter 8 898 0.009
modules 2 172 0.011
fib_recursive 11 880 0.012
asdl_generated 11 376 0.030
parse 26 776 0.034
scoped_resource 48 1,043 0.046
files 4 62 0.067
tuple_return_value 16 193 0.085
containers 16 106 0.150
length 42 195 0.213
cartesian 87 324 0.269
escape 107 352 0.304
cgi 261 508 0.514
varargs 21 20 1.031
control_flow 202 105 1.923

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.7 0.40
parse 3.8 7.7 0.49
scoped_resource 3.5 7.1 0.50
cartesian 3.5 6.9 0.51
length 3.5 6.9 0.51
cgi 3.7 6.9 0.53
escape 3.7 6.9 0.53
modules 3.7 6.9 0.53
tuple_return_value 3.7 6.9 0.53
loops 3.8 7.1 0.54
asdl_generated 3.7 6.8 0.54
fib_iter 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
files 3.8 6.9 0.55
control_flow 3.9 6.7 0.59
containers 28.7 47.8 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 8 0.000
containers 0 32 0.000
escape 0 4 0.000
fib_iter 0 4 0.000
fib_recursive 0 8 0.000
modules 0 12 0.000
scoped_resource 0 4 0.000
classes 3 18 0.184
parse 4 16 0.235
files 4 16 0.268
length 4 12 0.348
loops 4 8 0.476
cartesian 4 8 0.496
control_flow 8 12 0.654
varargs 46 52 0.872
cgi 8 8 0.988
tuple_return_value 4 4 1.023

raw benchmark files