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 | 27 | 0.000 |
| loops | 0 | 290 | 0.000 |
| asdl_generated | 4 | 397 | 0.009 |
| fib_iter | 8 | 887 | 0.009 |
| modules | 2 | 175 | 0.010 |
| fib_recursive | 11 | 873 | 0.012 |
| parse | 25 | 754 | 0.034 |
| scoped_resource | 39 | 1,024 | 0.038 |
| files | 4 | 69 | 0.054 |
| containers | 12 | 111 | 0.107 |
| tuple_return_value | 20 | 186 | 0.108 |
| length | 38 | 205 | 0.183 |
| cartesian | 87 | 328 | 0.264 |
| escape | 106 | 350 | 0.302 |
| cgi | 267 | 527 | 0.506 |
| varargs | 20 | 19 | 1.064 |
| control_flow | 209 | 110 | 1.907 |
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.5 | 0.42 |
| parse | 3.8 | 7.7 | 0.49 |
| escape | 3.5 | 6.9 | 0.51 |
| cartesian | 3.7 | 7.1 | 0.52 |
| scoped_resource | 3.7 | 7.1 | 0.52 |
| loops | 3.8 | 7.2 | 0.53 |
| asdl_generated | 3.7 | 6.9 | 0.53 |
| cgi | 3.7 | 6.9 | 0.53 |
| length | 3.7 | 6.9 | 0.53 |
| modules | 3.7 | 6.9 | 0.53 |
| tuple_return_value | 3.8 | 7.1 | 0.54 |
| fib_iter | 3.8 | 6.9 | 0.55 |
| fib_recursive | 3.8 | 6.9 | 0.55 |
| files | 3.8 | 6.8 | 0.56 |
| control_flow | 3.9 | 6.9 | 0.57 |
| containers | 28.6 | 47.8 | 0.60 |
| varargs | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
| example name | C++ | Python | C++ : Python |
| cgi | 0 | 8 | 0.000 |
| control_flow | 0 | 4 | 0.000 |
| fib_iter | 0 | 8 | 0.000 |
| fib_recursive | 0 | 8 | 0.000 |
| modules | 0 | 8 | 0.000 |
| tuple_return_value | 0 | 8 | 0.000 |
| containers | 4 | 24 | 0.166 |
| files | 4 | 8 | 0.463 |
| parse | 4 | 8 | 0.529 |
| scoped_resource | 8 | 12 | 0.649 |
| varargs | 45 | 54 | 0.836 |
| classes | 3 | 4 | 0.856 |
| asdl_generated | 7 | 8 | 0.908 |
| loops | 4 | 4 | 0.913 |
| cartesian | 4 | 4 | 0.983 |
| escape | 4 | 4 | 1.023 |
| length | 8 | 4 | 1.865 |