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_recursive 7 881 0.008
fib_iter 7 905 0.008
modules 2 177 0.010
loops 4 305 0.012
asdl_generated 11 375 0.029
parse 25 773 0.033
scoped_resource 44 1,026 0.043
containers 12 112 0.106
tuple_return_value 20 185 0.109
files 8 68 0.112
classes 3 23 0.138
length 44 201 0.219
cartesian 82 331 0.248
escape 105 348 0.302
cgi 265 511 0.518
varargs 23 20 1.162
control_flow 203 110 1.850

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.6 10.9 0.42
parse 3.8 7.7 0.49
cgi 3.5 6.9 0.51
escape 3.5 6.9 0.51
control_flow 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
fib_recursive 3.7 6.9 0.53
files 3.7 6.9 0.53
cartesian 3.5 6.7 0.53
loops 3.8 7.1 0.54
tuple_return_value 3.8 7.1 0.54
fib_iter 3.8 6.9 0.55
modules 3.8 6.9 0.55
length 3.9 7.1 0.56
containers 28.6 47.7 0.60
varargs 5.6 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 8 0.000
classes 0 8 0.000
escape 0 8 0.000
files 0 8 0.000
length 0 8 0.000
loops 0 4 0.000
modules 0 4 0.000
tuple_return_value 0 8 0.000
containers 4 24 0.164
parse 4 12 0.354
scoped_resource 4 8 0.497
cgi 4 8 0.502
varargs 42 52 0.819
control_flow 4 4 0.999
cartesian 8 8 1.031
fib_recursive 4 0 inf
fib_iter 0 0 NA

raw benchmark files