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 | 23 | 0.000 |
| loops | 0 | 284 | 0.000 |
| modules | 0 | 177 | 0.000 |
| fib_recursive | 7 | 885 | 0.008 |
| fib_iter | 8 | 889 | 0.009 |
| asdl_generated | 11 | 382 | 0.028 |
| containers | 4 | 117 | 0.032 |
| parse | 26 | 778 | 0.033 |
| scoped_resource | 38 | 1,058 | 0.036 |
| files | 4 | 63 | 0.059 |
| tuple_return_value | 16 | 189 | 0.086 |
| length | 36 | 202 | 0.180 |
| cartesian | 86 | 329 | 0.263 |
| escape | 107 | 336 | 0.319 |
| cgi | 250 | 504 | 0.496 |
| varargs | 27 | 20 | 1.365 |
| control_flow | 204 | 105 | 1.951 |
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.7 | 7.6 | 0.48 |
| asdl_generated | 3.5 | 6.9 | 0.51 |
| cartesian | 3.5 | 6.9 | 0.51 |
| cgi | 3.5 | 6.9 | 0.51 |
| escape | 3.7 | 7.1 | 0.52 |
| fib_recursive | 3.7 | 6.9 | 0.53 |
| control_flow | 3.8 | 7.1 | 0.54 |
| length | 3.8 | 7.1 | 0.54 |
| loops | 3.8 | 7.1 | 0.54 |
| fib_iter | 3.8 | 6.9 | 0.55 |
| files | 3.8 | 6.9 | 0.55 |
| modules | 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.6 | 47.8 | 0.60 |
| varargs | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
| example name | C++ | Python | C++ : Python |
| escape | 0 | 12 | 0.000 |
| fib_iter | 0 | 8 | 0.000 |
| modules | 2 | 8 | 0.222 |
| loops | 4 | 12 | 0.303 |
| files | 4 | 12 | 0.315 |
| classes | 3 | 8 | 0.420 |
| control_flow | 4 | 8 | 0.488 |
| cgi | 4 | 8 | 0.496 |
| cartesian | 4 | 8 | 0.514 |
| containers | 11 | 16 | 0.704 |
| varargs | 39 | 52 | 0.750 |
| parse | 4 | 4 | 0.925 |
| tuple_return_value | 4 | 4 | 1.009 |
| length | 8 | 4 | 1.995 |
| fib_recursive | 4 | 0 | inf |
| scoped_resource | 8 | 0 | inf |
| asdl_generated | 0 | 0 | NA |