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_iter | 7.5 | 799.6 | 0.01 |
fib_recursive | 19.8 | 981.3 | 0.02 |
asdl_generated | 8.4 | 377.0 | 0.02 |
scoped_resource | 23.5 | 851.9 | 0.03 |
tuple_return_value | 4.2 | 122.6 | 0.03 |
loops | 12.3 | 341.4 | 0.04 |
modules | 15.6 | 224.2 | 0.07 |
containers | 16.6 | 113.5 | 0.15 |
parse | 584.2 | 1,658.7 | 0.35 |
cgi | 499.5 | 521.7 | 0.96 |
files | 94.2 | 80.3 | 1.17 |
escape | 837.3 | 369.9 | 2.26 |
control_flow | 320.0 | 120.1 | 2.67 |
cartesian | 1,997.7 | 716.7 | 2.79 |
length | 609.6 | 174.1 | 3.50 |
classes | 686.9 | 28.8 | 23.84 |
Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).
example name | C++ | Python | C++ : Python |
containers | 58.5 | 47.5 | 1.2 |
files | 58.2 | 7.1 | 8.2 |
loops | 58.8 | 7.1 | 8.2 |
scoped_resource | 58.3 | 7.0 | 8.3 |
tuple_return_value | 58.4 | 7.0 | 8.3 |
asdl_generated | 58.2 | 7.0 | 8.4 |
modules | 58.4 | 7.0 | 8.4 |
fib_recursive | 58.2 | 6.9 | 8.4 |
fib_iter | 58.3 | 6.9 | 8.5 |
control_flow | 68.6 | 7.0 | 9.9 |
cgi | 186.2 | 6.9 | 26.9 |
length | 294.8 | 7.0 | 42.3 |
escape | 475.7 | 6.8 | 69.5 |
parse | 972.2 | 7.6 | 127.5 |
cartesian | 1,033.1 | 6.9 | 150.6 |
classes | 2,263.2 | 7.2 | 312.5 |