Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
fib_iter | 8 | 919 | 0.008 |
modules | 2 | 180 | 0.010 |
fib_recursive | 11 | 878 | 0.012 |
loops | 4 | 304 | 0.013 |
parse | 21 | 778 | 0.027 |
asdl_generated | 11 | 383 | 0.028 |
containers | 4 | 120 | 0.032 |
scoped_resource | 47 | 1,063 | 0.044 |
files | 4 | 68 | 0.056 |
tuple_return_value | 21 | 193 | 0.110 |
length | 33 | 204 | 0.163 |
classes | 3 | 20 | 0.166 |
cartesian | 87 | 317 | 0.275 |
escape | 106 | 356 | 0.298 |
cgi | 251 | 506 | 0.496 |
control_flow | 207 | 113 | 1.837 |
varargs | 28 | 8 | 3.435 |
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.6 | 0.50 |
cartesian | 3.5 | 6.9 | 0.51 |
cgi | 3.5 | 6.9 | 0.51 |
fib_iter | 3.5 | 6.9 | 0.51 |
escape | 3.7 | 7.1 | 0.52 |
loops | 3.8 | 7.2 | 0.53 |
asdl_generated | 3.7 | 6.9 | 0.53 |
fib_recursive | 3.7 | 6.9 | 0.53 |
length | 3.8 | 7.1 | 0.54 |
scoped_resource | 3.8 | 7.1 | 0.54 |
files | 3.8 | 6.9 | 0.55 |
modules | 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 | 12 | 0.000 |
control_flow | 0 | 8 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
loops | 0 | 12 | 0.000 |
modules | 0 | 8 | 0.000 |
cartesian | 4 | 12 | 0.333 |
files | 4 | 8 | 0.480 |
containers | 12 | 24 | 0.485 |
cgi | 4 | 8 | 0.504 |
varargs | 39 | 64 | 0.613 |
parse | 8 | 4 | 2.099 |
length | 11 | 4 | 2.779 |
asdl_generated | 0 | 0 | NA |
escape | 0 | 0 | NA |
scoped_resource | 0 | 0 | NA |
tuple_return_value | 0 | 0 | NA |