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 884 0.009
modules 2 186 0.010
fib_recursive 11 883 0.012
loops 4 288 0.013
asdl_generated 11 376 0.030
parse 26 745 0.035
scoped_resource 44 1,027 0.043
files 4 80 0.049
containers 8 106 0.075
tuple_return_value 17 193 0.088
classes 4 24 0.160
length 40 199 0.201
cartesian 90 338 0.265
escape 95 358 0.266
cgi 263 511 0.516
varargs 20 29 0.683
control_flow 201 108 1.867

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.8 7.7 0.49
cgi 3.5 7.1 0.50
cartesian 3.5 6.9 0.51
escape 3.7 7.1 0.52
fib_iter 3.7 7.1 0.52
fib_recursive 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
length 3.7 6.9 0.53
modules 3.7 6.9 0.53
loops 3.8 7.1 0.54
scoped_resource 3.8 7.1 0.54
files 3.7 6.8 0.54
tuple_return_value 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
containers 28.7 47.8 0.60
varargs 5.4 6.9 0.77

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 8 0.000
classes 0 8 0.000
fib_iter 0 4 0.000
fib_recursive 0 4 0.000
loops 0 8 0.000
modules 0 4 0.000
containers 8 33 0.243
parse 4 12 0.309
length 4 12 0.335
cgi 4 8 0.500
tuple_return_value 3 4 0.844
scoped_resource 4 4 1.007
control_flow 8 8 1.008
varargs 47 45 1.043
escape 12 8 1.497
files 4 0 inf
cartesian 0 0 NA

raw benchmark files