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 881 0.009
modules 2 174 0.011
fib_recursive 11 894 0.012
loops 4 285 0.013
asdl_generated 11 373 0.030
parse 25 768 0.033
scoped_resource 48 1,032 0.046
files 7 76 0.097
tuple_return_value 20 183 0.110
containers 12 104 0.115
length 34 202 0.167
classes 3 19 0.173
cartesian 81 322 0.252
escape 99 345 0.287
cgi 257 530 0.486
varargs 21 28 0.748
control_flow 210 106 1.976

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

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 8 0.000
classes 0 11 0.000
control_flow 0 8 0.000
fib_iter 0 8 0.000
fib_recursive 0 4 0.000
loops 0 12 0.000
modules 0 8 0.000
scoped_resource 0 12 0.000
tuple_return_value 0 12 0.000
containers 4 32 0.124
parse 4 8 0.520
escape 8 12 0.667
cartesian 8 8 1.008
varargs 46 44 1.047
cgi 12 8 1.490
length 11 4 2.782
files 0 0 NA

raw benchmark files