Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
| example name | gen | C++ | Python | C++ : Python |
| fib_iter | gen | 7 | 889 | 0.008 |
| modules | gen | 2 | 176 | 0.010 |
| fib_recursive | gen | 11 | 874 | 0.012 |
| loops | gen | 4 | 284 | 0.013 |
| asdl_generated | gen | 7 | 377 | 0.019 |
| scoped_resource | gen | 39 | 1,027 | 0.038 |
| parse | gen | 29 | 765 | 0.039 |
| files | gen | 4 | 72 | 0.051 |
| containers | gen | 8 | 123 | 0.062 |
| tuple_return_value | gen | 20 | 196 | 0.102 |
| classes | gen | 3 | 23 | 0.136 |
| length | gen | 46 | 204 | 0.226 |
| cartesian | gen | 84 | 328 | 0.257 |
| escape | gen | 98 | 351 | 0.281 |
| cgi | gen | 243 | 512 | 0.474 |
| control_flow | gen | 208 | 106 | 1.962 |
| varargs | gen | 23 | 8 | 3.087 |
| gc_stack_roots | gen | 0 | 0 | NA |
Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).
| example name | gen | C++ | Python | C++ : Python |
| classes | gen | 4.5 | 10.8 | 0.41 |
| escape | gen | 3.5 | 7.1 | 0.50 |
| gc_stack_roots | gen | 3.5 | 7.1 | 0.50 |
| parse | gen | 3.8 | 7.6 | 0.50 |
| fib_iter | gen | 3.5 | 6.9 | 0.51 |
| scoped_resource | gen | 3.7 | 7.1 | 0.52 |
| loops | gen | 3.8 | 7.2 | 0.53 |
| cgi | gen | 3.8 | 7.1 | 0.54 |
| files | gen | 3.8 | 7.1 | 0.54 |
| modules | gen | 3.8 | 7.1 | 0.54 |
| fib_recursive | gen | 3.7 | 6.8 | 0.54 |
| asdl_generated | gen | 3.8 | 6.9 | 0.55 |
| cartesian | gen | 3.8 | 6.9 | 0.55 |
| control_flow | gen | 3.8 | 6.9 | 0.55 |
| length | gen | 3.8 | 6.8 | 0.56 |
| tuple_return_value | gen | 3.9 | 6.9 | 0.57 |
| containers | gen | 28.5 | 47.8 | 0.60 |
| varargs | gen | 5.6 | 6.9 | 0.81 |
Lower ratios are better.
| example name | gen | C++ | Python | C++ : Python |
| classes | gen | 0 | 8 | 0.000 |
| control_flow | gen | 0 | 8 | 0.000 |
| fib_iter | gen | 0 | 8 | 0.000 |
| fib_recursive | gen | 0 | 16 | 0.000 |
| length | gen | 0 | 8 | 0.000 |
| loops | gen | 0 | 12 | 0.000 |
| modules | gen | 0 | 8 | 0.000 |
| parse | gen | 0 | 12 | 0.000 |
| tuple_return_value | gen | 0 | 4 | 0.000 |
| gc_stack_roots | gen | 2 | 12 | 0.152 |
| containers | gen | 8 | 12 | 0.636 |
| scoped_resource | gen | 8 | 12 | 0.648 |
| varargs | gen | 43 | 65 | 0.666 |
| asdl_generated | gen | 4 | 4 | 0.895 |
| files | gen | 4 | 4 | 0.919 |
| cgi | gen | 12 | 8 | 1.493 |
| escape | gen | 8 | 4 | 2.060 |
| cartesian | gen | 8 | 0 | inf |