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_iter | 8 | 890 | 0.008 |
modules | 2 | 174 | 0.010 |
loops | 4 | 308 | 0.012 |
fib_recursive | 11 | 879 | 0.012 |
asdl_generated | 11 | 370 | 0.029 |
parse | 27 | 770 | 0.034 |
scoped_resource | 47 | 1,031 | 0.046 |
files | 4 | 69 | 0.054 |
tuple_return_value | 16 | 185 | 0.087 |
containers | 12 | 119 | 0.099 |
classes | 3 | 22 | 0.146 |
cartesian | 74 | 336 | 0.220 |
length | 45 | 202 | 0.222 |
escape | 106 | 343 | 0.310 |
cgi | 253 | 509 | 0.497 |
varargs | 27 | 16 | 1.737 |
control_flow | 208 | 107 | 1.947 |
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 |
parse | 3.8 | 7.6 | 0.50 |
cartesian | 3.5 | 6.9 | 0.51 |
escape | 3.5 | 6.9 | 0.51 |
fib_recursive | 3.5 | 6.9 | 0.51 |
fib_iter | 3.7 | 7.1 | 0.52 |
scoped_resource | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
files | 3.7 | 6.9 | 0.53 |
loops | 3.8 | 7.1 | 0.54 |
control_flow | 3.8 | 6.9 | 0.55 |
length | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.9 | 6.9 | 0.57 |
containers | 28.9 | 47.7 | 0.61 |
varargs | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 12 | 0.000 |
cgi | 0 | 8 | 0.000 |
classes | 0 | 9 | 0.000 |
control_flow | 0 | 8 | 0.000 |
escape | 0 | 8 | 0.000 |
fib_iter | 0 | 4 | 0.000 |
fib_recursive | 0 | 4 | 0.000 |
length | 0 | 8 | 0.000 |
modules | 0 | 8 | 0.000 |
scoped_resource | 0 | 4 | 0.000 |
containers | 4 | 20 | 0.199 |
files | 4 | 8 | 0.458 |
parse | 4 | 8 | 0.475 |
tuple_return_value | 4 | 8 | 0.499 |
varargs | 39 | 55 | 0.709 |
cartesian | 16 | 0 | inf |
loops | 0 | 0 | NA |