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_recursive | 4 | 627 | 0.006 |
fib_iter | 5 | 651 | 0.008 |
modules | 1 | 125 | 0.010 |
loops | 3 | 208 | 0.013 |
asdl_generated | 4 | 275 | 0.014 |
parse | 17 | 553 | 0.030 |
scoped_resource | 34 | 720 | 0.047 |
tuple_return_value | 11 | 133 | 0.080 |
files | 5 | 54 | 0.096 |
containers | 8 | 84 | 0.101 |
classes | 2 | 14 | 0.168 |
length | 27 | 147 | 0.186 |
cartesian | 64 | 235 | 0.273 |
escape | 120 | 244 | 0.494 |
cgi | 189 | 365 | 0.518 |
varargs | 17 | 16 | 1.019 |
control_flow | 147 | 78 | 1.881 |
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 |
parse | 3.9 | 7.7 | 0.51 |
scoped_resource | 3.8 | 7.3 | 0.52 |
modules | 3.8 | 7.3 | 0.52 |
cartesian | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.7 | 7.1 | 0.52 |
escape | 3.7 | 7.0 | 0.53 |
cgi | 3.7 | 7.1 | 0.53 |
loops | 3.8 | 7.2 | 0.53 |
fib_iter | 3.8 | 7.1 | 0.53 |
fib_recursive | 3.8 | 7.1 | 0.53 |
length | 3.8 | 7.1 | 0.53 |
control_flow | 3.9 | 7.2 | 0.54 |
files | 3.9 | 7.1 | 0.55 |
tuple_return_value | 3.9 | 7.1 | 0.55 |
containers | 28.5 | 47.7 | 0.60 |
varargs | 5.6 | 7.1 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
cartesian | 0 | 8 | 0.000 |
classes | 0 | 7 | 0.000 |
control_flow | 0 | 4 | 0.000 |
loops | 0 | 16 | 0.000 |
modules | 0 | 4 | 0.000 |
scoped_resource | 0 | 4 | 0.000 |
containers | 4 | 16 | 0.264 |
parse | 4 | 8 | 0.524 |
escape | 6 | 8 | 0.793 |
tuple_return_value | 4 | 4 | 0.881 |
varargs | 29 | 33 | 0.891 |
asdl_generated | 4 | 4 | 0.945 |
fib_recursive | 4 | 4 | 0.947 |
length | 4 | 4 | 0.982 |
cgi | 0 | 0 | NA |
fib_iter | 0 | 0 | NA |
files | 0 | 0 | NA |