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 8 870 0.009
fib_recursive 11 937 0.012
modules 2 175 0.012
loops 4 285 0.013
asdl_generated 11 378 0.029
parse 29 789 0.037
scoped_resource 47 1,040 0.045
files 4 77 0.050
containers 8 112 0.071
tuple_return_value 20 183 0.109
classes 3 22 0.150
length 41 197 0.210
cartesian 91 325 0.279
escape 103 343 0.299
cgi 270 516 0.523
varargs 16 28 0.556
control_flow 212 110 1.931

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
escape 3.5 7.1 0.50
parse 3.8 7.6 0.50
cartesian 3.7 7.1 0.52
fib_recursive 3.7 7.1 0.52
length 3.7 7.1 0.52
cgi 3.7 6.9 0.53
fib_iter 3.7 6.9 0.53
modules 3.7 6.9 0.53
scoped_resource 3.7 6.9 0.53
asdl_generated 3.5 6.7 0.53
files 3.8 7.1 0.54
loops 3.8 7.1 0.54
tuple_return_value 3.8 7.1 0.54
control_flow 3.8 6.9 0.55
containers 28.6 47.8 0.60
varargs 5.5 7.1 0.78

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 8 0.000
cartesian 0 12 0.000
cgi 0 8 0.000
classes 0 9 0.000
control_flow 0 4 0.000
fib_iter 0 16 0.000
fib_recursive 0 4 0.000
loops 0 8 0.000
modules 0 8 0.000
parse 0 4 0.000
scoped_resource 0 16 0.000
tuple_return_value 0 8 0.000
length 4 12 0.318
containers 8 24 0.330
escape 4 8 0.515
varargs 51 44 1.149
files 4 0 inf

raw benchmark files