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
modules gen 0 2 175 0.000
fib_iter gen 4 8 898 0.004
fib_recursive gen 7 11 880 0.008
asdl_generated gen 4 4 394 0.009
loops gen 4 3 285 0.013
parse gen 22 27 755 0.029
containers gen 4 15 134 0.030
scoped_resource gen 32 42 1,061 0.030
files gen 4 8 68 0.056
tuple_return_value gen 12 15 196 0.063
gc_stack_roots gen 2 2 12 0.144
length gen 45 45 198 0.228
classes gen 4 3 16 0.235
cartesian gen 92 79 332 0.278
escape gen 101 97 347 0.292
varargs gen 12 16 25 0.473
cgi gen 252 273 511 0.492
control_flow gen 205 162 109 1.872

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.3 10.7 0.42
parse gen 3.8 3.9 7.6 0.50
cgi gen 3.5 3.5 6.9 0.51
asdl_generated gen 3.7 3.7 6.9 0.53
cartesian gen 3.7 3.7 6.9 0.53
fib_iter gen 3.7 3.7 6.9 0.53
gc_stack_roots gen 3.7 3.5 6.9 0.53
tuple_return_value gen 3.7 3.8 6.9 0.53
length gen 3.8 3.7 7.1 0.54
loops gen 3.8 3.8 7.1 0.54
escape gen 3.7 3.7 6.8 0.54
modules gen 3.7 3.8 6.8 0.54
control_flow gen 3.8 3.9 6.9 0.55
fib_recursive gen 3.8 3.5 6.9 0.55
files gen 3.8 3.8 6.9 0.55
scoped_resource gen 3.8 3.8 6.9 0.55
containers gen 28.6 28.6 47.6 0.60
varargs gen 5.6 5.6 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cartesian gen 0 8 8 0.000
classes gen 0 0 16 0.000
length gen 0 0 12 0.000
loops gen 0 0 12 0.000
modules gen 2 0 8 0.224
files gen 4 0 8 0.474
control_flow gen 4 0 8 0.504
fib_recursive gen 4 0 4 0.908
escape gen 4 8 4 0.978
cgi gen 4 0 4 0.993
varargs gen 54 51 45 1.204
parse gen 7 0 4 1.827
asdl_generated gen 7 7 4 1.858
containers gen 12 0 4 2.922
fib_iter gen 4 0 0 inf
scoped_resource gen 16 4 0 inf
tuple_return_value gen 8 4 0 inf
gc_stack_roots gen 0 0 0 NA

raw benchmark files