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
containers gen 0 5 120 0.000
fib_iter gen 4 8 885 0.004
modules gen 2 2 174 0.010
loops gen 4 0 308 0.012
fib_recursive gen 11 11 877 0.012
asdl_generated gen 11 11 378 0.028
parse gen 25 23 772 0.032
scoped_resource gen 49 41 1,040 0.047
tuple_return_value gen 21 15 189 0.110
files gen 8 8 65 0.117
classes gen 3 3 23 0.141
length gen 40 45 213 0.188
gc_stack_roots gen 2 2 8 0.220
cartesian gen 92 80 333 0.276
escape gen 103 101 340 0.303
cgi gen 255 268 513 0.497
varargs gen 32 36 20 1.563
control_flow gen 209 159 110 1.894

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.5 4.5 10.8 0.41
gc_stack_roots gen 3.4 3.5 6.9 0.49
modules gen 3.5 3.8 7.1 0.50
parse gen 3.8 3.8 7.6 0.50
asdl_generated gen 3.7 3.7 6.9 0.53
cartesian gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
fib_iter gen 3.7 3.8 6.9 0.53
length gen 3.7 3.8 6.9 0.53
scoped_resource gen 3.7 3.5 6.9 0.53
loops gen 3.8 3.8 7.1 0.54
tuple_return_value gen 3.8 3.8 7.1 0.54
cgi gen 3.7 3.7 6.8 0.54
files gen 3.8 3.7 6.9 0.55
control_flow gen 3.9 3.8 6.9 0.57
fib_recursive gen 3.9 3.8 6.9 0.57
containers gen 28.4 28.6 47.6 0.60
varargs gen 5.6 5.5 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 0 4 0.000
cartesian gen 0 8 4 0.000
cgi gen 0 0 8 0.000
classes gen 0 0 8 0.000
control_flow gen 0 4 4 0.000
escape gen 0 0 12 0.000
fib_recursive gen 0 0 12 0.000
files gen 0 0 11 0.000
gc_stack_roots gen 0 0 4 0.000
modules gen 0 0 12 0.000
scoped_resource gen 0 4 8 0.000
tuple_return_value gen 0 4 8 0.000
fib_iter gen 4 0 8 0.472
parse gen 4 4 8 0.520
varargs gen 36 32 53 0.676
containers gen 16 10 16 0.972
length gen 4 0 4 0.998
loops gen 0 3 0 NA

raw benchmark files