Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
fib_recursive | 8.4 | 1,069.0 | 0.01 |
scoped_resource | 19.0 | 931.2 | 0.02 |
fib_iter | 20.8 | 870.4 | 0.02 |
modules | 7.9 | 250.9 | 0.03 |
asdl_generated | 27.0 | 423.7 | 0.06 |
tuple_return_value | 11.7 | 156.3 | 0.08 |
loops | 29.1 | 367.8 | 0.08 |
containers | 15.5 | 124.0 | 0.13 |
parse | 607.4 | 1,833.1 | 0.33 |
cgi | 582.1 | 595.5 | 0.98 |
files | 111.2 | 91.5 | 1.21 |
escape | 959.6 | 400.7 | 2.39 |
control_flow | 352.3 | 134.7 | 2.62 |
cartesian | 2,284.7 | 817.6 | 2.79 |
length | 734.1 | 211.8 | 3.47 |
classes | 727.8 | 33.5 | 21.70 |
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.6 | 1.2 |
loops | 58.8 | 7.2 | 8.1 |
scoped_resource | 58.3 | 7.0 | 8.3 |
files | 58.3 | 7.0 | 8.3 |
fib_recursive | 58.4 | 7.0 | 8.4 |
tuple_return_value | 58.3 | 6.9 | 8.4 |
modules | 58.3 | 6.9 | 8.4 |
fib_iter | 58.3 | 6.9 | 8.4 |
asdl_generated | 58.3 | 6.9 | 8.4 |
control_flow | 68.5 | 7.0 | 9.8 |
cgi | 186.4 | 6.9 | 26.9 |
length | 294.9 | 7.0 | 42.4 |
escape | 475.6 | 6.8 | 70.0 |
parse | 972.2 | 7.6 | 128.1 |
cartesian | 1,033.2 | 7.0 | 148.4 |
classes | 2,263.2 | 7.2 | 312.3 |