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 | 890 | 0.009 |
modules | 2 | 173 | 0.010 |
fib_recursive | 11 | 882 | 0.012 |
loops | 4 | 289 | 0.013 |
parse | 22 | 774 | 0.029 |
asdl_generated | 11 | 371 | 0.029 |
containers | 4 | 121 | 0.032 |
scoped_resource | 44 | 1,034 | 0.043 |
tuple_return_value | 16 | 188 | 0.085 |
files | 7 | 69 | 0.107 |
classes | 3 | 27 | 0.121 |
length | 45 | 204 | 0.220 |
cartesian | 79 | 321 | 0.247 |
escape | 99 | 371 | 0.267 |
cgi | 265 | 501 | 0.529 |
varargs | 28 | 16 | 1.735 |
control_flow | 210 | 111 | 1.886 |
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 |
asdl_generated | 3.5 | 7.1 | 0.50 |
length | 3.5 | 6.9 | 0.51 |
parse | 3.9 | 7.6 | 0.52 |
cgi | 3.7 | 6.9 | 0.53 |
control_flow | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
tuple_return_value | 3.7 | 6.9 | 0.53 |
fib_recursive | 3.8 | 7.1 | 0.54 |
files | 3.8 | 7.1 | 0.54 |
loops | 3.8 | 7.1 | 0.54 |
cartesian | 3.8 | 6.9 | 0.55 |
fib_iter | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.9 | 0.55 |
scoped_resource | 3.8 | 6.9 | 0.55 |
containers | 28.8 | 47.8 | 0.60 |
varargs | 5.4 | 6.9 | 0.77 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 8 | 0.000 |
classes | 0 | 4 | 0.000 |
control_flow | 0 | 4 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
fib_recursive | 0 | 4 | 0.000 |
files | 0 | 8 | 0.000 |
length | 0 | 8 | 0.000 |
loops | 0 | 4 | 0.000 |
modules | 0 | 12 | 0.000 |
cgi | 4 | 12 | 0.337 |
escape | 8 | 12 | 0.662 |
varargs | 39 | 56 | 0.708 |
containers | 12 | 16 | 0.716 |
tuple_return_value | 4 | 4 | 1.003 |
scoped_resource | 4 | 4 | 1.007 |
cartesian | 12 | 8 | 1.483 |
parse | 7 | 4 | 1.852 |