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
classes gen 0 0 13 0.000
modules gen 0 0 174 0.000
fib_recursive gen 7 11 884 0.008
fib_iter gen 8 9 892 0.008
loops gen 4 3 283 0.013
asdl_generated gen 7 11 374 0.019
parse gen 26 27 773 0.034
scoped_resource gen 44 42 1,032 0.043
files gen 4 4 71 0.051
tuple_return_value gen 20 18 184 0.110
containers gen 15 5 111 0.139
length gen 30 45 204 0.146
cartesian gen 76 81 329 0.231
escape gen 96 93 347 0.277
varargs gen 8 35 20 0.382
cgi gen 264 260 507 0.520
control_flow gen 208 163 109 1.909
gc_stack_roots gen 2 0 0 inf

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.9 0.41
asdl_generated gen 3.5 3.5 6.9 0.51
cartesian gen 3.5 3.5 6.9 0.51
gc_stack_roots gen 3.5 3.5 6.9 0.51
parse gen 3.9 3.9 7.6 0.52
scoped_resource gen 3.7 3.8 7.1 0.52
tuple_return_value gen 3.7 3.8 7.1 0.52
cgi gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
fib_recursive gen 3.7 3.8 6.9 0.53
loops gen 3.8 3.8 7.1 0.54
files gen 3.8 3.8 6.9 0.55
length gen 3.8 3.8 6.9 0.55
modules gen 3.8 3.7 6.9 0.55
control_flow gen 3.9 3.8 6.9 0.57
fib_iter gen 3.9 3.8 6.9 0.57
containers gen 28.6 28.3 47.6 0.60
varargs gen 5.5 5.5 6.8 0.81

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
containers gen 0 10 24 0.000
control_flow gen 0 0 4 0.000
fib_iter gen 0 0 4 0.000
gc_stack_roots gen 0 2 12 0.000
loops gen 0 0 12 0.000
tuple_return_value gen 0 0 8 0.000
classes gen 3 3 17 0.186
modules gen 2 2 8 0.223
parse gen 4 0 12 0.309
cgi gen 4 8 12 0.334
asdl_generated gen 4 0 8 0.443
fib_recursive gen 4 0 8 0.447
files gen 4 4 4 0.913
scoped_resource gen 4 4 4 1.003
escape gen 8 12 8 1.006
varargs gen 57 31 52 1.102
cartesian gen 16 4 12 1.346
length gen 15 0 8 1.856

raw benchmark files