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 | 306 | 0.000 |
fib_iter | 8 | 927 | 0.008 |
fib_recursive | 7 | 874 | 0.008 |
modules | 2 | 176 | 0.010 |
asdl_generated | 11 | 378 | 0.029 |
parse | 22 | 758 | 0.029 |
scoped_resource | 40 | 1,034 | 0.039 |
files | 4 | 72 | 0.055 |
tuple_return_value | 12 | 198 | 0.061 |
containers | 10 | 109 | 0.094 |
classes | 3 | 19 | 0.169 |
length | 44 | 197 | 0.224 |
cartesian | 86 | 323 | 0.265 |
escape | 102 | 342 | 0.299 |
cgi | 269 | 506 | 0.531 |
varargs | 20 | 24 | 0.814 |
control_flow | 209 | 106 | 1.972 |
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.8 | 7.5 | 0.51 |
cartesian | 3.5 | 6.9 | 0.51 |
escape | 3.5 | 6.9 | 0.51 |
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 |
length | 3.8 | 7.1 | 0.54 |
loops | 3.8 | 7.1 | 0.54 |
modules | 3.8 | 7.1 | 0.54 |
files | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
control_flow | 3.8 | 6.8 | 0.56 |
fib_recursive | 3.8 | 6.8 | 0.56 |
containers | 28.7 | 47.7 | 0.60 |
varargs | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 12 | 0.000 |
cgi | 0 | 8 | 0.000 |
classes | 0 | 11 | 0.000 |
control_flow | 0 | 8 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
length | 0 | 12 | 0.000 |
modules | 0 | 8 | 0.000 |
containers | 5 | 24 | 0.211 |
escape | 4 | 12 | 0.343 |
fib_recursive | 4 | 4 | 0.899 |
loops | 4 | 4 | 0.922 |
varargs | 47 | 48 | 0.976 |
files | 4 | 4 | 0.987 |
scoped_resource | 8 | 8 | 1.003 |
cartesian | 4 | 4 | 1.024 |
parse | 7 | 4 | 1.853 |
tuple_return_value | 8 | 4 | 1.990 |