Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
classes | 0 | 16 | 0.000 |
fib_iter | 8 | 896 | 0.009 |
modules | 2 | 170 | 0.011 |
fib_recursive | 11 | 877 | 0.012 |
loops | 4 | 291 | 0.013 |
asdl_generated | 11 | 377 | 0.029 |
parse | 25 | 766 | 0.033 |
scoped_resource | 48 | 1,019 | 0.047 |
files | 4 | 68 | 0.057 |
containers | 8 | 115 | 0.069 |
tuple_return_value | 20 | 193 | 0.104 |
length | 44 | 208 | 0.213 |
cartesian | 78 | 327 | 0.238 |
escape | 98 | 344 | 0.286 |
cgi | 265 | 510 | 0.519 |
varargs | 24 | 24 | 1.013 |
control_flow | 209 | 104 | 2.016 |
Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).
example name | C++ | Python | C++ : Python |
classes | 4.5 | 10.7 | 0.41 |
asdl_generated | 3.5 | 7.1 | 0.50 |
parse | 3.9 | 7.6 | 0.52 |
cartesian | 3.7 | 7.1 | 0.52 |
loops | 3.8 | 7.2 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
length | 3.7 | 6.9 | 0.53 |
modules | 3.7 | 6.9 | 0.53 |
scoped_resource | 3.8 | 7.1 | 0.54 |
tuple_return_value | 3.8 | 7.1 | 0.54 |
fib_iter | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.8 | 0.56 |
control_flow | 3.9 | 6.9 | 0.57 |
containers | 28.8 | 47.8 | 0.60 |
varargs | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 4 | 0.000 |
control_flow | 0 | 12 | 0.000 |
fib_iter | 0 | 4 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
length | 0 | 4 | 0.000 |
loops | 0 | 4 | 0.000 |
modules | 0 | 12 | 0.000 |
scoped_resource | 0 | 8 | 0.000 |
classes | 3 | 16 | 0.203 |
containers | 8 | 20 | 0.398 |
files | 4 | 8 | 0.481 |
cgi | 4 | 8 | 0.492 |
varargs | 44 | 47 | 0.928 |
escape | 8 | 8 | 0.984 |
parse | 4 | 4 | 1.042 |
cartesian | 12 | 8 | 1.542 |
tuple_return_value | 0 | 0 | NA |