Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
loops | 0 | 290 | 0.000 |
modules | 0 | 179 | 0.000 |
fib_iter | 8 | 903 | 0.008 |
fib_recursive | 11 | 888 | 0.012 |
asdl_generated | 7 | 370 | 0.019 |
parse | 30 | 759 | 0.039 |
scoped_resource | 43 | 1,058 | 0.040 |
tuple_return_value | 20 | 184 | 0.109 |
files | 8 | 63 | 0.121 |
classes | 3 | 23 | 0.139 |
containers | 15 | 99 | 0.156 |
length | 44 | 204 | 0.216 |
cartesian | 87 | 328 | 0.264 |
escape | 102 | 349 | 0.292 |
varargs | 8 | 20 | 0.400 |
cgi | 265 | 515 | 0.513 |
control_flow | 205 | 113 | 1.807 |
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 |
cartesian | 3.5 | 6.9 | 0.51 |
fib_recursive | 3.5 | 6.9 | 0.51 |
parse | 3.9 | 7.6 | 0.52 |
asdl_generated | 3.7 | 7.1 | 0.52 |
fib_iter | 3.7 | 7.1 | 0.52 |
scoped_resource | 3.7 | 7.1 | 0.52 |
cgi | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
modules | 3.7 | 6.9 | 0.53 |
loops | 3.8 | 7.1 | 0.54 |
files | 3.8 | 6.9 | 0.55 |
length | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
control_flow | 3.9 | 6.9 | 0.57 |
containers | 28.6 | 47.7 | 0.60 |
varargs | 5.6 | 6.9 | 0.81 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
classes | 0 | 8 | 0.000 |
containers | 0 | 36 | 0.000 |
fib_iter | 0 | 4 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
files | 0 | 12 | 0.000 |
length | 0 | 8 | 0.000 |
parse | 0 | 4 | 0.000 |
tuple_return_value | 0 | 8 | 0.000 |
modules | 2 | 12 | 0.150 |
asdl_generated | 4 | 8 | 0.448 |
escape | 4 | 8 | 0.513 |
loops | 4 | 4 | 0.908 |
cartesian | 4 | 4 | 0.984 |
cgi | 4 | 4 | 1.003 |
scoped_resource | 4 | 4 | 1.061 |
varargs | 60 | 52 | 1.154 |
control_flow | 4 | 0 | inf |