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 23 0.000
fib_iter gen 8 8 892 0.008
modules gen 2 2 175 0.010
fib_recursive gen 11 7 885 0.012
loops gen 4 0 288 0.014
asdl_generated gen 11 7 380 0.029
parse gen 29 27 753 0.039
scoped_resource gen 47 37 1,035 0.046
containers gen 5 10 104 0.049
files gen 4 4 61 0.061
tuple_return_value gen 21 18 189 0.110
length gen 40 41 201 0.201
cartesian gen 71 83 333 0.213
gc_stack_roots gen 2 2 8 0.216
escape gen 108 104 348 0.309
cgi gen 258 264 522 0.493
varargs gen 23 12 27 0.875
control_flow gen 207 160 111 1.858

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
cartesian gen 3.5 3.7 6.9 0.51
fib_recursive gen 3.5 3.8 6.9 0.51
scoped_resource gen 3.7 3.7 7.1 0.52
parse gen 3.9 3.9 7.5 0.53
asdl_generated gen 3.7 3.7 6.9 0.53
cgi gen 3.7 3.5 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
length gen 3.7 3.8 6.9 0.53
modules 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
fib_iter gen 3.8 3.7 6.9 0.55
files gen 3.8 3.7 6.8 0.56
control_flow gen 3.9 3.7 6.9 0.57
containers gen 28.5 28.6 47.5 0.60
varargs gen 5.5 5.5 7.1 0.78

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 4 4 0.000
control_flow gen 0 0 4 0.000
fib_iter gen 0 0 4 0.000
fib_recursive gen 0 4 8 0.000
gc_stack_roots gen 0 0 4 0.000
loops gen 0 3 4 0.000
modules gen 0 0 8 0.000
parse gen 0 0 12 0.000
scoped_resource gen 0 8 8 0.000
tuple_return_value gen 0 0 4 0.000
files gen 4 4 15 0.245
containers gen 10 5 32 0.321
classes gen 3 3 8 0.415
cgi gen 4 4 8 0.501
varargs gen 43 54 46 0.936
length gen 4 4 4 1.002
escape gen 12 0 4 2.986
cartesian gen 20 4 0 inf

raw benchmark files