Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
loops | 0 | 294 | 0.000 |
fib_iter | 8 | 888 | 0.009 |
modules | 2 | 182 | 0.010 |
fib_recursive | 11 | 879 | 0.013 |
asdl_generated | 11 | 371 | 0.029 |
parse | 26 | 814 | 0.031 |
scoped_resource | 43 | 1,048 | 0.042 |
files | 4 | 69 | 0.056 |
containers | 12 | 112 | 0.104 |
tuple_return_value | 21 | 191 | 0.108 |
length | 45 | 207 | 0.216 |
varargs | 8 | 36 | 0.218 |
escape | 86 | 349 | 0.246 |
cartesian | 86 | 332 | 0.260 |
classes | 3 | 11 | 0.282 |
cgi | 269 | 517 | 0.520 |
control_flow | 212 | 110 | 1.923 |
Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).
example name | C++ | Python | C++ : Python |
classes | 4.5 | 10.8 | 0.41 |
parse | 3.8 | 7.6 | 0.50 |
loops | 3.7 | 7.2 | 0.51 |
cartesian | 3.5 | 6.9 | 0.51 |
scoped_resource | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
fib_iter | 3.7 | 6.9 | 0.53 |
fib_recursive | 3.7 | 6.9 | 0.53 |
tuple_return_value | 3.7 | 6.9 | 0.53 |
control_flow | 3.8 | 7.1 | 0.54 |
files | 3.8 | 6.9 | 0.55 |
length | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.9 | 0.55 |
containers | 28.5 | 47.8 | 0.60 |
varargs | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 8 | 0.000 |
classes | 0 | 19 | 0.000 |
control_flow | 0 | 4 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
length | 0 | 4 | 0.000 |
tuple_return_value | 0 | 4 | 0.000 |
containers | 4 | 24 | 0.161 |
loops | 4 | 8 | 0.466 |
files | 4 | 8 | 0.472 |
scoped_resource | 4 | 8 | 0.494 |
parse | 4 | 8 | 0.532 |
varargs | 59 | 36 | 1.638 |
escape | 20 | 8 | 2.545 |
cartesian | 4 | 0 | inf |
cgi | 0 | 0 | NA |
modules | 0 | 0 | NA |