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 17 0.000
modules 0 181 0.000
fib_iter 8 885 0.009
fib_recursive 11 887 0.013
loops 4 292 0.013
parse 22 766 0.029
asdl_generated 11 376 0.030
scoped_resource 48 1,043 0.046
containers 8 94 0.082
tuple_return_value 20 188 0.107
files 8 73 0.108
length 41 209 0.196
cartesian 82 340 0.241
escape 102 350 0.292
cgi 266 505 0.526
varargs 17 20 0.839
control_flow 205 116 1.763

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
fib_recursive 3.4 6.9 0.49
parse 3.8 7.6 0.50
cartesian 3.5 6.9 0.51
asdl_generated 3.7 7.1 0.52
loops 3.7 7.1 0.52
modules 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
cgi 3.7 6.9 0.53
escape 3.7 6.9 0.53
length 3.8 7.1 0.54
fib_iter 3.8 6.9 0.55
files 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
containers 28.6 48.0 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 4 0.000
fib_iter 0 4 0.000
fib_recursive 0 4 0.000
files 0 4 0.000
loops 0 4 0.000
tuple_return_value 0 4 0.000
containers 8 39 0.197
classes 3 13 0.247
cgi 4 12 0.332
escape 4 12 0.342
parse 7 16 0.463
modules 2 4 0.467
varargs 50 51 0.969
cartesian 8 0 inf
control_flow 8 0 inf
length 4 0 inf
scoped_resource 0 0 NA

raw benchmark files