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 |
| classes | gen | 0 | 22 | 0.000 |
| gc_stack_roots | gen | 0 | 4 | 0.000 |
| modules | gen | 0 | 175 | 0.000 |
| fib_iter | gen | 8 | 888 | 0.008 |
| loops | gen | 4 | 299 | 0.012 |
| fib_recursive | gen | 11 | 882 | 0.012 |
| asdl_generated | gen | 11 | 381 | 0.028 |
| parse | gen | 25 | 770 | 0.032 |
| scoped_resource | gen | 43 | 1,048 | 0.041 |
| tuple_return_value | gen | 16 | 175 | 0.094 |
| containers | gen | 12 | 114 | 0.101 |
| files | gen | 8 | 63 | 0.122 |
| length | gen | 42 | 208 | 0.201 |
| cartesian | gen | 85 | 331 | 0.258 |
| escape | gen | 101 | 347 | 0.291 |
| cgi | gen | 250 | 512 | 0.488 |
| varargs | gen | 23 | 15 | 1.534 |
| control_flow | gen | 211 | 107 | 1.977 |
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.7 | 0.41 |
| gc_stack_roots | gen | 3.4 | 7.1 | 0.48 |
| parse | gen | 3.8 | 7.7 | 0.49 |
| cgi | gen | 3.5 | 7.1 | 0.50 |
| escape | gen | 3.5 | 6.9 | 0.51 |
| fib_iter | gen | 3.7 | 7.1 | 0.52 |
| length | gen | 3.7 | 7.1 | 0.52 |
| asdl_generated | gen | 3.7 | 6.9 | 0.53 |
| files | gen | 3.7 | 6.9 | 0.53 |
| fib_recursive | gen | 3.8 | 7.1 | 0.54 |
| scoped_resource | gen | 3.8 | 7.1 | 0.54 |
| cartesian | gen | 3.8 | 6.9 | 0.55 |
| control_flow | gen | 3.8 | 6.9 | 0.55 |
| loops | gen | 3.8 | 6.9 | 0.55 |
| modules | gen | 3.8 | 6.9 | 0.55 |
| tuple_return_value | gen | 3.8 | 6.9 | 0.55 |
| containers | gen | 28.5 | 47.8 | 0.60 |
| varargs | gen | 5.5 | 7.1 | 0.78 |
Lower ratios are better.
| example name | gen | C++ | Python | C++ : Python |
| asdl_generated | gen | 0 | 8 | 0.000 |
| control_flow | gen | 0 | 8 | 0.000 |
| fib_iter | gen | 0 | 8 | 0.000 |
| fib_recursive | gen | 0 | 8 | 0.000 |
| files | gen | 0 | 12 | 0.000 |
| loops | gen | 0 | 4 | 0.000 |
| containers | gen | 4 | 28 | 0.139 |
| gc_stack_roots | gen | 2 | 8 | 0.215 |
| modules | gen | 2 | 8 | 0.223 |
| tuple_return_value | gen | 4 | 12 | 0.344 |
| classes | gen | 3 | 9 | 0.367 |
| length | gen | 4 | 8 | 0.475 |
| cgi | gen | 4 | 8 | 0.495 |
| escape | gen | 4 | 8 | 0.507 |
| scoped_resource | gen | 4 | 8 | 0.542 |
| varargs | gen | 43 | 57 | 0.750 |
| parse | gen | 4 | 4 | 1.039 |
| cartesian | gen | 4 | 0 | inf |