Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
containers | 0 | 126 | 0.000 |
fib_recursive | 7 | 879 | 0.008 |
fib_iter | 8 | 886 | 0.009 |
modules | 2 | 175 | 0.011 |
loops | 4 | 293 | 0.015 |
asdl_generated | 11 | 380 | 0.029 |
parse | 30 | 774 | 0.038 |
scoped_resource | 44 | 1,019 | 0.043 |
tuple_return_value | 16 | 189 | 0.086 |
files | 8 | 66 | 0.117 |
classes | 3 | 23 | 0.145 |
length | 44 | 209 | 0.210 |
cartesian | 86 | 325 | 0.266 |
escape | 99 | 346 | 0.286 |
varargs | 12 | 32 | 0.365 |
cgi | 265 | 504 | 0.527 |
control_flow | 214 | 114 | 1.879 |
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.8 | 0.41 |
asdl_generated | 3.5 | 7.1 | 0.50 |
scoped_resource | 3.5 | 7.1 | 0.50 |
cartesian | 3.5 | 6.9 | 0.51 |
fib_iter | 3.5 | 6.9 | 0.51 |
parse | 3.9 | 7.6 | 0.52 |
escape | 3.7 | 6.9 | 0.53 |
files | 3.7 | 6.9 | 0.53 |
cgi | 3.8 | 7.1 | 0.54 |
length | 3.8 | 7.1 | 0.54 |
loops | 3.8 | 7.1 | 0.54 |
control_flow | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
modules | 3.9 | 6.9 | 0.57 |
containers | 28.6 | 48.0 | 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 |
classes | 0 | 8 | 0.000 |
fib_iter | 0 | 12 | 0.000 |
files | 0 | 12 | 0.000 |
loops | 0 | 4 | 0.000 |
modules | 0 | 8 | 0.000 |
parse | 0 | 8 | 0.000 |
cartesian | 4 | 16 | 0.248 |
fib_recursive | 4 | 8 | 0.452 |
cgi | 4 | 8 | 0.495 |
escape | 8 | 8 | 0.994 |
scoped_resource | 4 | 4 | 1.002 |
tuple_return_value | 4 | 4 | 1.009 |
containers | 16 | 12 | 1.337 |
varargs | 55 | 40 | 1.363 |
control_flow | 0 | 0 | NA |
length | 0 | 0 | NA |