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 | 4.7 | 771.9 | 0.01 |
scoped_resource | 7.2 | 855.3 | 0.01 |
fib_recursive | 15.7 | 923.4 | 0.02 |
modules | 3.6 | 201.8 | 0.02 |
loops | 7.3 | 346.2 | 0.02 |
tuple_return_value | 3.9 | 140.4 | 0.03 |
containers | 17.6 | 129.0 | 0.14 |
asdl_generated | 82.0 | 372.5 | 0.22 |
parse | 620.7 | 1,692.0 | 0.37 |
cgi | 526.3 | 572.8 | 0.92 |
files | 109.6 | 93.3 | 1.18 |
escape | 977.7 | 363.8 | 2.69 |
control_flow | 344.6 | 121.7 | 2.83 |
cartesian | 2,287.4 | 706.9 | 3.24 |
length | 671.9 | 197.0 | 3.41 |
classes | 728.6 | 30.6 | 23.81 |
Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).
example name | C++ | Python | C++ : Python |
containers | 33.2 | 47.5 | 0.7 |
tuple_return_value | 6.3 | 7.0 | 0.9 |
modules | 6.2 | 6.8 | 0.9 |
fib_recursive | 6.4 | 6.9 | 0.9 |
scoped_resource | 6.5 | 7.0 | 0.9 |
loops | 6.7 | 7.1 | 0.9 |
fib_iter | 6.5 | 6.9 | 0.9 |
asdl_generated | 42.2 | 6.8 | 6.2 |
files | 50.7 | 7.0 | 7.2 |
control_flow | 70.5 | 7.0 | 10.0 |
cgi | 186.2 | 6.9 | 27.2 |
parse | 216.1 | 7.7 | 28.0 |
length | 294.8 | 6.9 | 42.9 |
escape | 480.0 | 6.9 | 69.7 |
cartesian | 1,097.3 | 7.0 | 156.4 |
classes | 2,263.2 | 7.2 | 314.3 |