Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
varargs | 0 | 5 | 0.000 |
modules | 1 | 259 | 0.004 |
fib_iter | 7 | 1,036 | 0.006 |
fib_recursive | 11 | 1,209 | 0.009 |
loops | 4 | 415 | 0.011 |
scoped_resource | 18 | 1,070 | 0.017 |
tuple_return_value | 5 | 150 | 0.032 |
asdl_generated | 34 | 495 | 0.069 |
strings | 1 | 10 | 0.091 |
classes | 4 | 26 | 0.141 |
containers | 27 | 135 | 0.196 |
cgi | 277 | 637 | 0.434 |
escape | 288 | 465 | 0.618 |
length | 192 | 185 | 1.037 |
Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).
example name | C++ | Python | C++ : Python |
asdl_generated | 2.9 | 7.5 | 0.38 |
classes | 4.3 | 11.1 | 0.39 |
loops | 3.0 | 7.7 | 0.39 |
scoped_resource | 3.0 | 7.7 | 0.39 |
varargs | 3.0 | 7.5 | 0.40 |
modules | 3.0 | 7.4 | 0.40 |
escape | 3.1 | 7.5 | 0.41 |
strings | 3.1 | 7.6 | 0.41 |
tuple_return_value | 3.1 | 7.4 | 0.41 |
fib_iter | 3.1 | 7.4 | 0.42 |
fib_recursive | 3.2 | 7.5 | 0.43 |
cgi | 3.2 | 7.4 | 0.43 |
containers | 27.2 | 48.1 | 0.57 |
length | 11.1 | 7.5 | 1.49 |