Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
classes | 0 | 26 | 0.000 |
fib_iter | 8 | 905 | 0.008 |
modules | 2 | 183 | 0.010 |
fib_recursive | 11 | 889 | 0.012 |
loops | 4 | 290 | 0.013 |
asdl_generated | 7 | 385 | 0.019 |
parse | 30 | 778 | 0.038 |
scoped_resource | 43 | 1,021 | 0.042 |
containers | 8 | 110 | 0.071 |
tuple_return_value | 20 | 189 | 0.106 |
files | 7 | 67 | 0.109 |
length | 45 | 202 | 0.225 |
cartesian | 89 | 328 | 0.271 |
escape | 95 | 345 | 0.275 |
cgi | 261 | 516 | 0.505 |
varargs | 25 | 28 | 0.898 |
control_flow | 209 | 113 | 1.859 |
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.7 | 0.41 |
cgi | 3.5 | 7.1 | 0.50 |
parse | 3.8 | 7.6 | 0.50 |
cartesian | 3.5 | 6.9 | 0.51 |
asdl_generated | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
fib_iter | 3.7 | 6.9 | 0.53 |
loops | 3.8 | 7.1 | 0.54 |
modules | 3.8 | 7.1 | 0.54 |
scoped_resource | 3.8 | 7.1 | 0.54 |
fib_recursive | 3.7 | 6.8 | 0.54 |
length | 3.7 | 6.8 | 0.54 |
files | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
control_flow | 3.9 | 6.9 | 0.57 |
containers | 28.3 | 47.8 | 0.59 |
varargs | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
control_flow | 0 | 4 | 0.000 |
fib_iter | 0 | 4 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
files | 0 | 8 | 0.000 |
length | 0 | 4 | 0.000 |
loops | 0 | 8 | 0.000 |
parse | 0 | 8 | 0.000 |
tuple_return_value | 0 | 8 | 0.000 |
asdl_generated | 4 | 12 | 0.304 |
scoped_resource | 4 | 12 | 0.325 |
containers | 8 | 24 | 0.330 |
cartesian | 4 | 8 | 0.483 |
classes | 3 | 4 | 0.745 |
varargs | 41 | 43 | 0.952 |
escape | 12 | 8 | 1.494 |
cgi | 8 | 4 | 2.004 |
modules | 0 | 0 | NA |