Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
files | 0 | 66 | 0.000 |
fib_iter | 4 | 890 | 0.004 |
fib_recursive | 7 | 885 | 0.008 |
modules | 2 | 172 | 0.010 |
loops | 4 | 292 | 0.013 |
asdl_generated | 11 | 371 | 0.029 |
parse | 29 | 780 | 0.038 |
scoped_resource | 48 | 1,017 | 0.047 |
containers | 8 | 115 | 0.068 |
tuple_return_value | 20 | 200 | 0.101 |
length | 42 | 208 | 0.203 |
cartesian | 77 | 324 | 0.238 |
classes | 3 | 13 | 0.246 |
escape | 103 | 339 | 0.304 |
cgi | 249 | 504 | 0.494 |
control_flow | 206 | 107 | 1.919 |
varargs | 33 | 12 | 2.732 |
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 |
scoped_resource | 3.5 | 7.1 | 0.50 |
asdl_generated | 3.5 | 6.9 | 0.51 |
cgi | 3.5 | 6.9 | 0.51 |
parse | 3.9 | 7.5 | 0.53 |
cartesian | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
modules | 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 |
files | 3.8 | 6.9 | 0.55 |
length | 3.8 | 6.9 | 0.55 |
control_flow | 3.9 | 6.9 | 0.57 |
containers | 28.5 | 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 | 17 | 0.000 |
loops | 0 | 4 | 0.000 |
modules | 0 | 12 | 0.000 |
scoped_resource | 0 | 8 | 0.000 |
tuple_return_value | 0 | 4 | 0.000 |
cgi | 4 | 16 | 0.249 |
fib_iter | 4 | 12 | 0.317 |
escape | 4 | 12 | 0.331 |
containers | 8 | 20 | 0.380 |
control_flow | 4 | 8 | 0.508 |
varargs | 33 | 61 | 0.546 |
files | 7 | 12 | 0.645 |
fib_recursive | 4 | 4 | 0.895 |
cartesian | 12 | 8 | 1.524 |
length | 4 | 0 | inf |
parse | 0 | 0 | NA |