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 | 4.2 | 334.8 | 0.01 |
scoped_resource | 23.4 | 876.8 | 0.03 |
fib_recursive | 27.8 | 974.5 | 0.03 |
fib_iter | 23.5 | 766.1 | 0.03 |
tuple_return_value | 8.0 | 133.9 | 0.06 |
asdl_generated | 26.6 | 382.4 | 0.07 |
modules | 19.7 | 208.6 | 0.09 |
containers | 16.4 | 128.9 | 0.13 |
parse | 575.6 | 1,732.6 | 0.33 |
cgi | 516.2 | 524.9 | 0.98 |
files | 123.2 | 97.1 | 1.27 |
control_flow | 335.5 | 133.7 | 2.51 |
escape | 934.5 | 371.5 | 2.52 |
cartesian | 2,199.7 | 704.2 | 3.12 |
length | 672.6 | 191.6 | 3.51 |
classes | 611.2 | 37.1 | 16.47 |
Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).
example name | C++ | Python | C++ : Python |
containers | 58.4 | 47.5 | 1.2 |
loops | 58.6 | 7.2 | 8.1 |
scoped_resource | 58.3 | 7.1 | 8.2 |
files | 58.3 | 7.1 | 8.3 |
tuple_return_value | 58.4 | 7.0 | 8.4 |
fib_iter | 58.2 | 6.9 | 8.4 |
modules | 58.3 | 6.9 | 8.4 |
fib_recursive | 58.3 | 6.9 | 8.4 |
asdl_generated | 58.2 | 6.9 | 8.5 |
control_flow | 68.6 | 6.9 | 9.9 |
cgi | 186.2 | 6.9 | 26.9 |
length | 294.8 | 6.9 | 42.6 |
escape | 475.5 | 6.8 | 69.6 |
parse | 972.2 | 7.5 | 128.9 |
cartesian | 1,033.1 | 6.9 | 149.2 |
classes | 2,263.2 | 7.2 | 314.5 |