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
containers 0 105 0.000
fib_iter 7 885 0.008
modules 2 182 0.010
fib_recursive 11 881 0.012
loops 4 287 0.013
asdl_generated 11 423 0.025
parse 28 771 0.037
scoped_resource 47 1,030 0.045
files 4 68 0.060
tuple_return_value 20 182 0.110
classes 3 26 0.122
length 46 208 0.220
cartesian 79 322 0.245
varargs 8 32 0.259
escape 101 344 0.292
cgi 267 514 0.520
control_flow 198 111 1.780

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

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cgi 0 8 0.000
classes 0 4 0.000
fib_iter 0 12 0.000
fib_recursive 0 4 0.000
length 0 4 0.000
loops 0 12 0.000
modules 0 8 0.000
scoped_resource 0 4 0.000
tuple_return_value 0 8 0.000
files 4 8 0.509
containers 16 28 0.553
escape 8 12 0.669
cartesian 12 12 0.994
parse 4 4 1.016
varargs 58 40 1.448
control_flow 8 4 1.994
asdl_generated 0 0 NA

raw benchmark files