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 23 0.000
modules 0 176 0.000
fib_iter 8 902 0.009
fib_recursive 11 874 0.012
loops 4 289 0.015
asdl_generated 11 396 0.027
containers 4 113 0.035
parse 30 784 0.038
scoped_resource 48 1,023 0.046
tuple_return_value 16 188 0.085
files 8 76 0.105
length 41 205 0.199
cartesian 88 321 0.274
escape 103 351 0.292
cgi 261 510 0.513
varargs 17 15 1.093
control_flow 209 106 1.978

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.2 10.7 0.39
parse 3.8 7.5 0.51
asdl_generated 3.5 6.9 0.51
scoped_resource 3.7 7.1 0.52
escape 3.5 6.8 0.52
cgi 3.7 6.9 0.53
fib_recursive 3.7 6.9 0.53
length 3.7 6.9 0.53
loops 3.8 7.1 0.54
fib_iter 3.7 6.8 0.54
control_flow 3.8 6.9 0.55
files 3.8 6.9 0.55
modules 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
cartesian 3.8 6.8 0.56
containers 28.7 47.8 0.60
varargs 5.4 7.1 0.76

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 4 0.000
control_flow 0 8 0.000
fib_iter 0 8 0.000
fib_recursive 0 16 0.000
loops 0 12 0.000
parse 0 4 0.000
scoped_resource 0 8 0.000
modules 2 8 0.231
classes 3 8 0.438
containers 12 24 0.483
cartesian 4 8 0.497
varargs 50 57 0.874
tuple_return_value 4 4 1.004
cgi 8 8 1.011
length 4 4 1.014
escape 4 0 inf
files 0 0 NA

raw benchmark files