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 4 893 0.004
fib_recursive 7 891 0.008
modules 2 187 0.010
loops 4 295 0.013
asdl_generated 11 370 0.030
scoped_resource 40 1,045 0.038
parse 30 779 0.039
tuple_return_value 16 189 0.086
containers 12 116 0.102
files 8 73 0.108
classes 4 28 0.139
length 42 210 0.199
cartesian 79 350 0.226
escape 98 354 0.278
cgi 266 501 0.531
varargs 20 16 1.230
control_flow 210 103 2.036

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 7.1 0.50
parse 3.8 7.5 0.51
asdl_generated 3.5 6.9 0.51
escape 3.5 6.9 0.51
cgi 3.7 6.9 0.53
scoped_resource 3.7 6.9 0.53
loops 3.8 7.1 0.54
fib_iter 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
files 3.8 6.9 0.55
length 3.8 6.9 0.55
modules 3.8 6.9 0.55
control_flow 3.9 7.1 0.56
tuple_return_value 3.8 6.8 0.56
containers 28.5 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 12 0.000
classes 0 4 0.000
control_flow 0 12 0.000
files 0 4 0.000
loops 0 4 0.000
parse 0 4 0.000
containers 4 24 0.165
cgi 4 12 0.338
scoped_resource 8 16 0.496
varargs 47 56 0.844
fib_recursive 4 4 0.913
length 4 4 0.959
fib_iter 4 4 0.969
tuple_return_value 4 4 1.030
escape 8 4 1.959
cartesian 12 4 2.955
modules 0 0 NA

raw benchmark files