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 | 24 | 0.000 |
fib_iter | 8 | 877 | 0.009 |
modules | 2 | 179 | 0.010 |
fib_recursive | 11 | 886 | 0.012 |
loops | 4 | 289 | 0.013 |
asdl_generated | 11 | 379 | 0.028 |
containers | 4 | 124 | 0.032 |
scoped_resource | 35 | 1,042 | 0.034 |
parse | 29 | 756 | 0.039 |
files | 4 | 79 | 0.048 |
tuple_return_value | 20 | 187 | 0.108 |
length | 46 | 197 | 0.235 |
escape | 91 | 350 | 0.261 |
cartesian | 88 | 330 | 0.265 |
cgi | 269 | 521 | 0.515 |
varargs | 24 | 16 | 1.516 |
control_flow | 210 | 112 | 1.873 |
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.9 | 0.41 |
asdl_generated | 3.5 | 6.9 | 0.51 |
parse | 3.9 | 7.6 | 0.52 |
escape | 3.5 | 6.8 | 0.52 |
cartesian | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
length | 3.8 | 7.1 | 0.54 |
control_flow | 3.8 | 6.9 | 0.55 |
fib_iter | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
loops | 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.5 | 47.8 | 0.60 |
varargs | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 4 | 0.000 |
control_flow | 0 | 4 | 0.000 |
fib_iter | 0 | 12 | 0.000 |
fib_recursive | 0 | 4 | 0.000 |
length | 0 | 12 | 0.000 |
loops | 0 | 8 | 0.000 |
modules | 0 | 12 | 0.000 |
parse | 0 | 4 | 0.000 |
tuple_return_value | 0 | 12 | 0.000 |
classes | 4 | 8 | 0.450 |
containers | 12 | 20 | 0.590 |
varargs | 43 | 58 | 0.741 |
cartesian | 4 | 4 | 0.987 |
escape | 16 | 8 | 1.973 |
files | 4 | 0 | inf |
scoped_resource | 12 | 0 | inf |
cgi | 0 | 0 | NA |