Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
classes | 0 | 23 | 0.000 |
fib_iter | 8 | 908 | 0.008 |
modules | 2 | 178 | 0.010 |
fib_recursive | 11 | 882 | 0.012 |
loops | 4 | 294 | 0.012 |
asdl_generated | 11 | 377 | 0.029 |
parse | 26 | 772 | 0.034 |
scoped_resource | 43 | 1,022 | 0.042 |
containers | 10 | 113 | 0.091 |
files | 8 | 77 | 0.104 |
tuple_return_value | 20 | 184 | 0.110 |
length | 42 | 204 | 0.203 |
cartesian | 87 | 320 | 0.271 |
escape | 99 | 347 | 0.284 |
cgi | 265 | 512 | 0.519 |
varargs | 20 | 11 | 1.705 |
control_flow | 209 | 108 | 1.941 |
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.6 | 0.41 |
parse | 3.8 | 7.6 | 0.50 |
escape | 3.5 | 6.9 | 0.51 |
length | 3.5 | 6.9 | 0.51 |
cgi | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cartesian | 3.7 | 6.9 | 0.53 |
tuple_return_value | 3.7 | 6.9 | 0.53 |
loops | 3.8 | 7.1 | 0.54 |
fib_iter | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.9 | 0.55 |
scoped_resource | 3.8 | 6.9 | 0.55 |
files | 3.9 | 6.9 | 0.57 |
control_flow | 3.8 | 6.7 | 0.57 |
containers | 28.4 | 48.0 | 0.59 |
varargs | 5.6 | 6.9 | 0.81 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 4 | 0.000 |
control_flow | 0 | 8 | 0.000 |
fib_iter | 0 | 16 | 0.000 |
fib_recursive | 0 | 4 | 0.000 |
loops | 0 | 8 | 0.000 |
modules | 0 | 4 | 0.000 |
tuple_return_value | 0 | 8 | 0.000 |
containers | 5 | 24 | 0.212 |
cartesian | 4 | 12 | 0.328 |
classes | 3 | 8 | 0.418 |
parse | 4 | 8 | 0.465 |
scoped_resource | 4 | 8 | 0.487 |
varargs | 47 | 61 | 0.767 |
escape | 8 | 8 | 0.976 |
cgi | 4 | 4 | 0.991 |
length | 4 | 4 | 1.037 |
files | 0 | 0 | NA |