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 899 0.009
modules gen 2 2 187 0.010
fib_recursive gen 11 11 891 0.012
loops gen 4 0 306 0.014
asdl_generated gen 8 8 394 0.020
parse gen 27 23 775 0.035
scoped_resource gen 49 46 1,042 0.047
files gen 4 4 76 0.052
tuple_return_value gen 16 19 197 0.080
containers gen 12 7 121 0.096
length gen 41 43 214 0.190
gc_stack_roots gen 2 2 8 0.230
cartesian gen 87 82 337 0.258
escape gen 106 95 352 0.300
cgi gen 251 280 525 0.477
varargs gen 27 23 28 0.968
control_flow gen 211 157 111 1.897
pea_hello gen NA NA 15 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.6 4.5 12.5 0.37
cartesian gen 3.5 3.7 8.5 0.42
gc_stack_roots gen 3.5 3.7 8.5 0.42
cgi gen 3.5 3.7 8.4 0.42
escape gen 3.5 3.7 8.4 0.42
length gen 3.7 3.7 8.5 0.43
scoped_resource gen 3.7 3.8 8.5 0.43
asdl_generated gen 3.7 3.7 8.4 0.44
fib_iter gen 3.7 3.7 8.4 0.44
parse gen 3.9 3.8 9.0 0.44
loops gen 3.8 3.9 8.7 0.44
control_flow gen 3.8 3.8 8.5 0.45
fib_recursive gen 3.8 3.7 8.5 0.45
files gen 3.8 3.8 8.5 0.45
modules gen 3.8 3.7 8.5 0.45
tuple_return_value gen 3.8 3.7 8.4 0.45
containers gen 28.5 28.7 48.8 0.58
varargs gen 5.5 5.4 8.4 0.66
pea_hello gen NA NA 8.1 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
control_flow gen 0 4 12 0.000
escape gen 0 12 12 0.000
fib_iter gen 0 0 4 0.000
fib_recursive gen 0 0 4 0.000
gc_stack_roots gen 0 0 12 0.000
loops gen 0 3 4 0.000
modules gen 0 0 8 0.000
containers gen 4 7 24 0.161
classes gen 3 3 16 0.225
parse gen 4 4 12 0.322
length gen 4 4 8 0.467
asdl_generated gen 4 4 8 0.485
files gen 4 4 8 0.494
varargs gen 39 43 52 0.744
tuple_return_value gen 4 0 4 0.975
cartesian gen 4 4 4 0.984
cgi gen 4 0 4 0.993
pea_hello gen NA NA 4 NA
scoped_resource gen 0 0 0 NA

raw benchmark files