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 | 291 | 0.000 |
modules | 0 | 184 | 0.000 |
fib_recursive | 7 | 900 | 0.008 |
fib_iter | 8 | 895 | 0.008 |
asdl_generated | 11 | 374 | 0.029 |
containers | 4 | 122 | 0.032 |
parse | 30 | 760 | 0.039 |
scoped_resource | 43 | 1,030 | 0.042 |
files | 4 | 67 | 0.055 |
tuple_return_value | 20 | 183 | 0.110 |
classes | 3 | 19 | 0.165 |
length | 40 | 202 | 0.198 |
cartesian | 90 | 332 | 0.271 |
escape | 98 | 356 | 0.275 |
cgi | 268 | 510 | 0.525 |
varargs | 16 | 24 | 0.657 |
control_flow | 209 | 107 | 1.960 |
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 |
scoped_resource | 3.5 | 7.1 | 0.50 |
parse | 3.9 | 7.6 | 0.52 |
length | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cartesian | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
fib_recursive | 3.7 | 6.9 | 0.53 |
modules | 3.7 | 6.9 | 0.53 |
loops | 3.8 | 7.1 | 0.54 |
cgi | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
fib_iter | 3.8 | 6.8 | 0.56 |
control_flow | 3.9 | 6.9 | 0.57 |
files | 3.9 | 6.9 | 0.57 |
containers | 28.6 | 47.7 | 0.60 |
varargs | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 8 | 0.000 |
cgi | 0 | 4 | 0.000 |
classes | 0 | 12 | 0.000 |
control_flow | 0 | 8 | 0.000 |
fib_iter | 0 | 4 | 0.000 |
parse | 0 | 20 | 0.000 |
tuple_return_value | 0 | 8 | 0.000 |
files | 4 | 8 | 0.443 |
modules | 2 | 4 | 0.460 |
scoped_resource | 4 | 8 | 0.487 |
length | 4 | 8 | 0.495 |
escape | 8 | 12 | 0.660 |
fib_recursive | 4 | 4 | 0.896 |
loops | 4 | 4 | 0.956 |
containers | 12 | 12 | 0.978 |
varargs | 51 | 48 | 1.067 |
cartesian | 0 | 0 | NA |