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++ C++-Souffle Python C++ : Python
fib_iter gen 4 8 892 0.004
modules gen 2 2 178 0.010
fib_recursive gen 11 7 883 0.012
loops gen 4 0 291 0.013
asdl_generated gen 11 11 373 0.029
parse gen 29 23 758 0.038
scoped_resource gen 48 42 1,028 0.047
tuple_return_value gen 17 18 183 0.092
containers gen 12 4 112 0.104
files gen 8 7 68 0.111
classes gen 3 3 26 0.122
gc_stack_roots gen 2 2 12 0.147
length gen 41 37 211 0.196
cartesian gen 84 80 330 0.254
escape gen 96 100 344 0.279
cgi gen 269 272 517 0.520
varargs gen 16 20 28 0.555
control_flow gen 209 160 106 1.979

Max Resident Set Size (MB)

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

example name gen C++ C++-Souffle Python C++ : Python
classes gen 4.3 4.5 10.8 0.40
parse gen 3.7 3.8 7.6 0.48
gc_stack_roots gen 3.4 3.5 6.9 0.49
escape gen 3.5 3.7 7.1 0.50
asdl_generated gen 3.7 3.5 6.9 0.53
cartesian gen 3.7 3.5 6.9 0.53
cgi gen 3.7 3.7 6.9 0.53
control_flow gen 3.7 3.9 6.9 0.53
modules gen 3.7 3.7 6.9 0.53
scoped_resource gen 3.7 3.8 6.9 0.53
tuple_return_value gen 3.7 3.7 6.9 0.53
loops gen 3.8 3.8 7.1 0.54
files gen 3.7 3.8 6.8 0.54
fib_iter gen 3.8 3.9 6.9 0.55
length gen 3.8 3.9 6.9 0.55
fib_recursive gen 3.9 3.7 6.9 0.57
containers gen 28.8 28.5 47.8 0.60
varargs gen 5.4 5.6 6.9 0.77

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 0 8 0.000
cgi gen 0 8 4 0.000
classes gen 0 0 4 0.000
control_flow gen 0 0 12 0.000
fib_recursive gen 0 4 4 0.000
files gen 0 0 8 0.000
loops gen 0 3 4 0.000
modules gen 0 0 4 0.000
parse gen 0 4 12 0.000
scoped_resource gen 0 4 8 0.000
containers gen 4 11 24 0.161
fib_iter gen 4 0 8 0.470
tuple_return_value gen 4 0 8 0.527
escape gen 8 4 8 1.001
varargs gen 50 47 44 1.148
cartesian gen 8 8 4 1.983
length gen 4 7 0 inf
gc_stack_roots gen 0 0 0 NA

raw benchmark files