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
loops gen 0 3 293 0.000
fib_iter gen 8 4 890 0.009
modules gen 2 2 172 0.010
fib_recursive gen 11 11 879 0.013
asdl_generated gen 11 11 379 0.029
parse gen 29 19 776 0.037
scoped_resource gen 48 42 1,032 0.047
files gen 4 0 73 0.054
tuple_return_value gen 17 18 183 0.094
classes gen 3 0 24 0.135
containers gen 16 11 95 0.169
length gen 41 41 199 0.205
cartesian gen 76 79 334 0.228
gc_stack_roots gen 2 2 8 0.235
escape gen 101 92 344 0.292
cgi gen 267 255 512 0.522
varargs gen 16 23 20 0.781
control_flow gen 201 156 111 1.820

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.6 4.3 10.7 0.43
gc_stack_roots gen 3.4 3.4 6.9 0.49
cartesian gen 3.5 3.5 7.1 0.50
parse gen 3.8 3.9 7.6 0.50
escape gen 3.7 3.5 7.1 0.52
asdl_generated gen 3.7 3.7 6.9 0.53
fib_iter gen 3.7 3.5 6.9 0.53
fib_recursive gen 3.7 3.8 6.9 0.53
length gen 3.7 3.7 6.9 0.53
modules gen 3.7 3.8 6.9 0.53
scoped_resource gen 3.8 3.8 7.1 0.54
cgi gen 3.8 3.5 6.9 0.55
control_flow gen 3.8 3.9 6.9 0.55
files gen 3.8 3.7 6.9 0.55
tuple_return_value gen 3.8 3.7 6.9 0.55
loops gen 3.9 3.8 7.1 0.56
containers gen 28.5 28.6 47.4 0.60
varargs gen 5.4 5.5 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 4 0.000
classes gen 0 4 8 0.000
containers gen 0 4 44 0.000
fib_iter gen 0 4 4 0.000
fib_recursive gen 0 0 4 0.000
gc_stack_roots gen 0 0 4 0.000
modules gen 0 0 12 0.000
parse gen 0 8 12 0.000
scoped_resource gen 0 4 12 0.000
tuple_return_value gen 3 0 12 0.288
length gen 4 4 12 0.310
escape gen 4 12 12 0.335
loops gen 4 0 4 0.936
varargs gen 51 43 52 0.976
files gen 4 7 4 0.980
cgi gen 4 4 4 1.014
cartesian gen 16 8 8 1.988
control_flow gen 8 4 4 1.998

raw benchmark files