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 27 0.000
fib_iter gen 8 4 937 0.008
modules gen 2 2 203 0.009
fib_recursive gen 11 7 897 0.012
loops gen 4 3 299 0.013
asdl_generated gen 7 11 389 0.018
containers gen 4 9 119 0.033
parse gen 27 23 763 0.035
scoped_resource gen 44 45 1,054 0.042
files gen 4 8 81 0.046
tuple_return_value gen 19 18 192 0.100
length gen 32 41 209 0.155
gc_stack_roots gen 2 2 8 0.229
cartesian gen 87 79 327 0.267
escape gen 103 93 354 0.290
cgi gen 273 259 521 0.523
varargs gen 19 4 31 0.630
control_flow gen 206 159 106 1.936
pea_hello gen NA NA 9 NA

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 12.5 0.36
asdl_generated gen 3.5 3.5 8.5 0.42
fib_iter gen 3.5 3.7 8.5 0.42
gc_stack_roots gen 3.5 3.5 8.4 0.42
cgi gen 3.7 3.7 8.5 0.43
escape gen 3.7 3.7 8.5 0.43
length gen 3.7 3.8 8.5 0.43
parse gen 3.9 3.8 9.1 0.43
cartesian gen 3.7 3.5 8.4 0.44
fib_recursive gen 3.7 3.7 8.4 0.44
control_flow gen 3.8 3.8 8.5 0.45
files gen 3.8 3.8 8.5 0.45
loops gen 3.8 3.8 8.5 0.45
modules gen 3.8 3.5 8.5 0.45
scoped_resource gen 3.8 3.5 8.4 0.45
tuple_return_value gen 3.8 3.8 8.3 0.46
containers gen 28.7 28.5 48.9 0.59
varargs gen 5.5 5.4 8.5 0.65
pea_hello gen NA NA 8.1 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cgi gen 0 8 8 0.000
fib_iter gen 0 4 4 0.000
fib_recursive gen 0 4 8 0.000
gc_stack_roots gen 0 0 12 0.000
loops gen 0 0 4 0.000
modules gen 0 0 8 0.000
tuple_return_value gen 0 0 8 0.000
parse gen 4 4 16 0.237
cartesian gen 4 8 16 0.249
control_flow gen 4 4 16 0.251
classes gen 3 3 12 0.278
containers gen 12 5 25 0.472
escape gen 8 8 16 0.496
files gen 4 0 4 0.913
varargs gen 46 62 50 0.930
scoped_resource gen 4 0 4 1.007
length gen 12 4 8 1.512
asdl_generated gen 4 0 0 inf
pea_hello gen NA NA 9 NA

raw benchmark files