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 | 121 | 0.000 |
| loops | 0 | 297 | 0.000 |
| modules | 0 | 186 | 0.000 |
| fib_recursive | 7 | 885 | 0.008 |
| fib_iter | 8 | 889 | 0.009 |
| parse | 22 | 764 | 0.029 |
| asdl_generated | 11 | 366 | 0.029 |
| scoped_resource | 44 | 1,109 | 0.040 |
| files | 4 | 64 | 0.059 |
| tuple_return_value | 20 | 189 | 0.107 |
| classes | 3 | 28 | 0.114 |
| length | 45 | 200 | 0.224 |
| cartesian | 83 | 351 | 0.235 |
| escape | 100 | 353 | 0.283 |
| cgi | 250 | 511 | 0.488 |
| control_flow | 202 | 111 | 1.822 |
| varargs | 32 | 12 | 2.594 |
Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).
| example name | C++ | Python | C++ : Python |
| classes | 4.3 | 10.7 | 0.40 |
| cgi | 3.5 | 7.1 | 0.50 |
| parse | 3.8 | 7.6 | 0.50 |
| cartesian | 3.7 | 7.1 | 0.52 |
| asdl_generated | 3.7 | 6.9 | 0.53 |
| escape | 3.7 | 6.9 | 0.53 |
| fib_recursive | 3.8 | 7.1 | 0.54 |
| files | 3.8 | 7.1 | 0.54 |
| loops | 3.8 | 7.1 | 0.54 |
| modules | 3.8 | 7.1 | 0.54 |
| control_flow | 3.8 | 6.9 | 0.55 |
| fib_iter | 3.8 | 6.9 | 0.55 |
| length | 3.8 | 6.9 | 0.55 |
| scoped_resource | 3.8 | 6.9 | 0.55 |
| tuple_return_value | 3.8 | 6.9 | 0.55 |
| containers | 28.5 | 47.6 | 0.60 |
| varargs | 5.5 | 7.1 | 0.78 |
Lower ratios are better.
| example name | C++ | Python | C++ : Python |
| asdl_generated | 0 | 12 | 0.000 |
| classes | 0 | 4 | 0.000 |
| fib_iter | 0 | 8 | 0.000 |
| length | 0 | 8 | 0.000 |
| tuple_return_value | 0 | 4 | 0.000 |
| files | 4 | 12 | 0.314 |
| loops | 4 | 8 | 0.480 |
| scoped_resource | 4 | 8 | 0.501 |
| cgi | 4 | 8 | 0.504 |
| varargs | 35 | 61 | 0.584 |
| parse | 7 | 12 | 0.620 |
| containers | 16 | 24 | 0.673 |
| fib_recursive | 4 | 4 | 0.898 |
| cartesian | 8 | 8 | 0.986 |
| escape | 8 | 4 | 1.991 |
| control_flow | 8 | 4 | 2.040 |
| modules | 2 | 0 | inf |