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 gen C++ Python C++ : Python
classes gen 0 27 0.000
gc_stack_roots gen 0 12 0.000
modules gen 0 192 0.000
fib_iter gen 8 892 0.009
fib_recursive gen 11 874 0.012
loops gen 4 292 0.012
asdl_generated gen 11 375 0.029
parse gen 26 764 0.034
scoped_resource gen 48 1,041 0.046
containers gen 8 121 0.066
files gen 7 72 0.103
tuple_return_value gen 20 186 0.109
length gen 45 199 0.227
cartesian gen 79 336 0.235
escape gen 101 346 0.292
cgi gen 269 522 0.514
varargs gen 16 16 0.972
control_flow gen 208 110 1.897

Max Resident Set Size (MB)

Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).

example name gen C++ Python C++ : Python
classes gen 4.3 10.6 0.41
parse gen 3.7 7.6 0.48
gc_stack_roots gen 3.4 6.9 0.49
fib_recursive gen 3.7 7.1 0.52
scoped_resource gen 3.7 7.1 0.52
asdl_generated gen 3.7 6.9 0.53
escape gen 3.7 6.9 0.53
fib_iter gen 3.7 6.9 0.53
length gen 3.7 6.9 0.53
files gen 3.8 7.1 0.54
loops gen 3.8 7.1 0.54
tuple_return_value gen 3.8 7.1 0.54
cartesian gen 3.8 6.9 0.55
cgi gen 3.8 6.9 0.55
modules gen 3.8 6.9 0.55
control_flow gen 3.9 7.1 0.56
containers gen 28.5 47.7 0.60
varargs gen 5.6 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name gen C++ Python C++ : Python
asdl_generated gen 0 8 0.000
cgi gen 0 4 0.000
control_flow gen 0 4 0.000
fib_iter gen 0 4 0.000
fib_recursive gen 0 12 0.000
files gen 0 4 0.000
length gen 0 12 0.000
loops gen 0 4 0.000
scoped_resource gen 0 12 0.000
tuple_return_value gen 0 8 0.000
parse gen 4 12 0.307
modules gen 2 4 0.464
containers gen 8 16 0.491
classes gen 4 5 0.795
varargs gen 51 56 0.902
escape gen 8 4 2.036
cartesian gen 12 4 2.962
gc_stack_roots gen 2 0 inf

raw benchmark files