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
varargs 0 28 0.000
fib_iter 4 893 0.004
modules 2 172 0.010
fib_recursive 11 880 0.012
loops 4 301 0.013
asdl_generated 7 382 0.019
parse 22 757 0.029
scoped_resource 38 1,073 0.036
containers 4 95 0.041
tuple_return_value 16 188 0.086
files 7 72 0.103
classes 3 26 0.125
length 40 201 0.200
cartesian 78 325 0.241
escape 100 351 0.284
cgi 254 512 0.496
control_flow 211 116 1.821

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
cartesian 3.5 7.1 0.50
parse 3.8 7.6 0.50
asdl_generated 3.5 6.9 0.51
cgi 3.5 6.9 0.51
escape 3.7 7.1 0.52
fib_recursive 3.7 6.9 0.53
files 3.7 6.9 0.53
length 3.7 6.9 0.53
loops 3.8 7.1 0.54
scoped_resource 3.8 7.1 0.54
fib_iter 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
modules 3.9 6.9 0.57
containers 28.6 47.8 0.60
varargs 5.4 6.9 0.77

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cgi 0 4 0.000
classes 0 4 0.000
files 0 4 0.000
loops 0 4 0.000
modules 0 12 0.000
containers 12 40 0.297
length 4 8 0.501
parse 7 12 0.609
fib_iter 4 4 0.942
escape 8 8 0.999
tuple_return_value 4 4 1.009
varargs 66 44 1.491
cartesian 12 8 1.543
scoped_resource 9 4 2.135
asdl_generated 4 0 inf
control_flow 0 0 NA
fib_recursive 0 0 NA

raw benchmark files