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 29 0.000
fib_recursive 7 889 0.008
fib_iter 8 892 0.009
modules 2 180 0.010
loops 5 287 0.016
asdl_generated 12 385 0.031
parse 30 758 0.040
scoped_resource 47 1,015 0.046
tuple_return_value 13 192 0.065
containers 8 123 0.068
files 8 70 0.109
length 37 213 0.173
cartesian 87 334 0.260
escape 104 351 0.296
cgi 267 501 0.533
varargs 27 25 1.113
control_flow 210 115 1.821

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
cgi 3.5 6.9 0.51
parse 3.9 7.6 0.52
loops 3.7 7.1 0.52
cartesian 3.7 6.9 0.53
escape 3.7 6.9 0.53
fib_recursive 3.7 6.9 0.53
files 3.8 7.1 0.54
scoped_resource 3.8 7.1 0.54
asdl_generated 3.8 6.9 0.55
length 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
fib_iter 3.9 6.9 0.57
modules 3.9 6.9 0.57
containers 28.5 47.8 0.60
varargs 5.4 6.8 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 12 0.000
cgi 0 16 0.000
fib_iter 0 12 0.000
files 0 8 0.000
loops 0 12 0.000
modules 0 8 0.000
parse 0 12 0.000
scoped_resource 0 12 0.000
containers 8 24 0.351
fib_recursive 4 8 0.449
varargs 39 49 0.795
classes 3 4 0.822
escape 4 4 1.002
cartesian 4 4 1.029
length 8 4 2.035
tuple_return_value 8 4 2.092
control_flow 0 0 NA

raw benchmark files