Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
modules | 2.2 | 322.1 | 0.007 |
fib_iter | 15.2 | 1,244.1 | 0.012 |
asdl_generated | 7.1 | 580.0 | 0.012 |
fib_recursive | 23.5 | 1,457.9 | 0.016 |
loops | 8.5 | 512.2 | 0.017 |
scoped_resource | 22.4 | 1,219.3 | 0.018 |
tuple_return_value | 8.6 | 209.5 | 0.041 |
classes | 2.5 | 43.5 | 0.059 |
strings | 2.1 | 14.8 | 0.142 |
cgi | 118.0 | 770.6 | 0.153 |
escape | 101.4 | 558.6 | 0.181 |
containers | 32.3 | 169.0 | 0.191 |
length | 64.0 | 266.4 | 0.240 |
varargs | 3.6 | 11.7 | 0.311 |
Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).
example name | C++ | Python | C++ : Python |
strings | 2.9 | 7.5 | 0.38 |
modules | 3.0 | 7.4 | 0.40 |
scoped_resource | 3.0 | 7.6 | 0.40 |
fib_iter | 2.9 | 7.3 | 0.40 |
tuple_return_value | 3.1 | 7.4 | 0.42 |
fib_recursive | 3.1 | 7.4 | 0.42 |
varargs | 3.2 | 7.5 | 0.42 |
loops | 3.4 | 7.7 | 0.44 |
length | 3.3 | 7.6 | 0.44 |
asdl_generated | 3.3 | 7.3 | 0.44 |
escape | 3.3 | 7.3 | 0.45 |
classes | 3.4 | 7.6 | 0.45 |
cgi | 3.4 | 7.4 | 0.46 |
containers | 36.2 | 47.9 | 0.75 |
c++
.