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
containers gen 0 112 0.000
fib_iter gen 8 892 0.008
modules gen 2 186 0.009
fib_recursive gen 11 904 0.012
loops gen 4 293 0.012
asdl_generated gen 11 375 0.029
parse gen 29 782 0.037
scoped_resource gen 44 1,039 0.042
files gen 4 67 0.055
tuple_return_value gen 20 193 0.104
gc_stack_roots gen 2 12 0.150
classes gen 3 19 0.167
length gen 37 200 0.184
cartesian gen 85 337 0.251
escape gen 102 350 0.292
cgi gen 258 517 0.499
varargs gen 17 28 0.593
control_flow gen 205 103 1.987

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.5 10.7 0.41
gc_stack_roots gen 3.4 6.9 0.49
parse gen 3.8 7.7 0.49
asdl_generated gen 3.7 7.1 0.52
cartesian gen 3.7 7.1 0.52
escape gen 3.7 7.1 0.52
scoped_resource gen 3.7 7.1 0.52
modules gen 3.7 6.9 0.53
loops gen 3.8 7.1 0.54
tuple_return_value gen 3.8 7.1 0.54
cgi gen 3.7 6.8 0.54
fib_iter gen 3.8 6.9 0.55
fib_recursive gen 3.8 6.9 0.55
files gen 3.8 6.9 0.55
control_flow gen 3.9 7.1 0.56
length gen 3.9 6.9 0.57
containers gen 28.7 47.8 0.60
varargs gen 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name gen C++ Python C++ : Python
asdl_generated gen 0 4 0.000
cgi gen 0 4 0.000
classes gen 0 11 0.000
fib_iter gen 0 8 0.000
fib_recursive gen 0 8 0.000
loops gen 0 4 0.000
parse gen 0 16 0.000
control_flow gen 4 12 0.331
files gen 4 8 0.468
escape gen 4 8 0.494
scoped_resource gen 4 8 0.498
cartesian gen 4 8 0.509
containers gen 15 24 0.644
length gen 8 8 1.020
varargs gen 50 44 1.133
gc_stack_roots gen 0 0 NA
modules gen 0 0 NA
tuple_return_value gen 0 0 NA

raw benchmark files