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_recursive | 7 | 939 | 0.008 |
fib_iter | 8 | 903 | 0.008 |
modules | 2 | 179 | 0.010 |
loops | 4 | 292 | 0.012 |
parse | 21 | 777 | 0.027 |
asdl_generated | 11 | 378 | 0.029 |
containers | 4 | 117 | 0.033 |
scoped_resource | 43 | 1,022 | 0.042 |
tuple_return_value | 20 | 194 | 0.104 |
files | 8 | 71 | 0.109 |
classes | 3 | 23 | 0.139 |
length | 36 | 203 | 0.179 |
cartesian | 78 | 338 | 0.231 |
escape | 98 | 360 | 0.272 |
varargs | 12 | 24 | 0.496 |
cgi | 261 | 512 | 0.510 |
control_flow | 207 | 102 | 2.026 |
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.9 | 0.41 |
cartesian | 3.5 | 7.1 | 0.50 |
parse | 3.8 | 7.6 | 0.50 |
asdl_generated | 3.5 | 6.9 | 0.51 |
cgi | 3.7 | 7.1 | 0.52 |
fib_recursive | 3.7 | 7.1 | 0.52 |
escape | 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 |
length | 3.8 | 6.9 | 0.55 |
loops | 3.9 | 7.1 | 0.56 |
control_flow | 3.8 | 6.8 | 0.56 |
modules | 3.9 | 6.9 | 0.57 |
containers | 28.6 | 47.8 | 0.60 |
varargs | 5.6 | 7.1 | 0.80 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 4 | 0.000 |
classes | 0 | 8 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
files | 0 | 4 | 0.000 |
loops | 0 | 8 | 0.000 |
modules | 0 | 4 | 0.000 |
tuple_return_value | 0 | 8 | 0.000 |
scoped_resource | 4 | 12 | 0.329 |
control_flow | 4 | 12 | 0.338 |
fib_recursive | 4 | 8 | 0.449 |
containers | 12 | 16 | 0.715 |
length | 8 | 8 | 0.994 |
cgi | 8 | 8 | 1.004 |
varargs | 55 | 48 | 1.156 |
escape | 8 | 4 | 1.956 |
parse | 8 | 4 | 2.121 |
cartesian | 12 | 4 | 3.062 |