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 22 0.000
fib_iter 8 902 0.008
modules 2 180 0.010
fib_recursive 11 935 0.012
loops 4 295 0.012
asdl_generated 7 377 0.019
scoped_resource 39 1,038 0.038
parse 29 764 0.039
tuple_return_value 21 206 0.100
containers 12 111 0.109
files 8 65 0.119
length 45 204 0.220
cartesian 79 333 0.237
escape 91 355 0.256
cgi 253 516 0.490
varargs 24 20 1.189
control_flow 210 108 1.948

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.5 10.7 0.41
parse 3.7 7.5 0.49
cgi 3.5 6.9 0.51
cartesian 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
files 3.5 6.8 0.52
escape 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
modules 3.8 6.9 0.55
length 3.8 6.8 0.56
control_flow 3.9 6.9 0.57
tuple_return_value 3.9 6.9 0.57
containers 28.5 48.0 0.59
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cgi 0 8 0.000
control_flow 0 8 0.000
fib_iter 0 8 0.000
fib_recursive 0 4 0.000
files 0 11 0.000
length 0 8 0.000
loops 0 4 0.000
modules 0 4 0.000
parse 0 8 0.000
tuple_return_value 0 4 0.000
containers 4 24 0.169
classes 3 9 0.368
scoped_resource 8 12 0.652
varargs 43 52 0.838
asdl_generated 4 4 0.900
cartesian 12 4 2.981
escape 16 0 inf

raw benchmark files