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 | 906 | 0.009 |
modules | 2 | 175 | 0.010 |
fib_recursive | 11 | 919 | 0.012 |
loops | 4 | 289 | 0.013 |
asdl_generated | 11 | 370 | 0.029 |
scoped_resource | 39 | 1,030 | 0.038 |
parse | 30 | 768 | 0.039 |
files | 7 | 73 | 0.103 |
tuple_return_value | 20 | 194 | 0.104 |
containers | 12 | 110 | 0.110 |
length | 41 | 206 | 0.201 |
classes | 3 | 16 | 0.201 |
cartesian | 90 | 345 | 0.260 |
escape | 96 | 348 | 0.276 |
cgi | 265 | 508 | 0.522 |
varargs | 24 | 27 | 0.876 |
control_flow | 205 | 106 | 1.932 |
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.8 | 0.41 |
fib_iter | 3.5 | 6.9 | 0.51 |
parse | 3.9 | 7.6 | 0.52 |
asdl_generated | 3.7 | 7.1 | 0.52 |
cartesian | 3.7 | 7.1 | 0.52 |
loops | 3.7 | 7.1 | 0.52 |
scoped_resource | 3.7 | 7.1 | 0.52 |
cgi | 3.7 | 6.9 | 0.53 |
control_flow | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
modules | 3.7 | 6.9 | 0.53 |
fib_recursive | 3.8 | 6.9 | 0.55 |
length | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
files | 3.9 | 6.9 | 0.57 |
containers | 28.7 | 47.8 | 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 |
classes | 0 | 16 | 0.000 |
control_flow | 0 | 8 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
fib_recursive | 0 | 12 | 0.000 |
files | 0 | 4 | 0.000 |
loops | 0 | 12 | 0.000 |
modules | 0 | 12 | 0.000 |
parse | 0 | 4 | 0.000 |
containers | 4 | 27 | 0.147 |
length | 4 | 8 | 0.466 |
cgi | 4 | 8 | 0.502 |
varargs | 43 | 46 | 0.937 |
scoped_resource | 8 | 4 | 1.959 |
escape | 8 | 4 | 2.001 |
cartesian | 0 | 0 | NA |
tuple_return_value | 0 | 0 | NA |