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
modules 0 135 0.000
fib_recursive 4 653 0.006
fib_iter 5 641 0.008
asdl_generated 4 314 0.011
loops 2 216 0.011
scoped_resource 7 549 0.012
containers 4 86 0.044
parse 32 562 0.058
files 5 49 0.098
tuple_return_value 14 135 0.103
classes 2 11 0.178
length 31 150 0.208
cartesian 58 255 0.227
escape 70 274 0.255
varargs 9 23 0.374
cgi 188 365 0.515
control_flow 148 79 1.880

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.9 0.41
parse 3.9 7.8 0.50
loops 3.8 7.4 0.52
asdl_generated 3.7 7.0 0.52
cgi 3.7 7.0 0.52
length 3.8 7.2 0.52
escape 3.7 7.0 0.53
modules 3.8 7.1 0.53
fib_iter 3.8 7.1 0.53
fib_recursive 3.8 7.1 0.53
cartesian 3.8 7.1 0.54
tuple_return_value 3.8 7.1 0.54
scoped_resource 3.9 7.2 0.54
files 3.8 7.1 0.54
control_flow 3.9 7.0 0.56
containers 28.5 47.8 0.60
varargs 5.6 7.0 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
classes 0 8 0.000
control_flow 0 4 0.000
files 0 4 0.000
length 0 4 0.000
loops 0 4 0.000
containers 8 8 0.928
escape 4 4 0.979
varargs 21 8 2.802
asdl_generated 4 0 inf
cartesian 4 0 inf
fib_recursive 4 0 inf
modules 1 0 inf
parse 4 0 inf
cgi 0 0 NA
fib_iter 0 0 NA
scoped_resource 0 0 NA
tuple_return_value 0 0 NA

raw benchmark files