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 | 15 | 0.000 |
fib_iter | 8 | 883 | 0.009 |
modules | 2 | 176 | 0.010 |
fib_recursive | 11 | 877 | 0.012 |
loops | 4 | 288 | 0.013 |
asdl_generated | 11 | 374 | 0.029 |
parse | 26 | 754 | 0.034 |
scoped_resource | 48 | 1,024 | 0.047 |
files | 4 | 72 | 0.052 |
containers | 10 | 103 | 0.102 |
tuple_return_value | 20 | 191 | 0.105 |
length | 41 | 200 | 0.206 |
cartesian | 85 | 329 | 0.258 |
varargs | 8 | 28 | 0.282 |
escape | 97 | 341 | 0.286 |
cgi | 269 | 512 | 0.525 |
control_flow | 209 | 103 | 2.025 |
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 |
cgi | 3.5 | 6.9 | 0.51 |
modules | 3.5 | 6.9 | 0.51 |
scoped_resource | 3.5 | 6.9 | 0.51 |
parse | 3.9 | 7.6 | 0.52 |
files | 3.7 | 7.1 | 0.52 |
length | 3.7 | 7.1 | 0.52 |
cartesian | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
fib_iter | 3.7 | 6.9 | 0.53 |
asdl_generated | 3.7 | 6.8 | 0.54 |
control_flow | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.9 | 0.55 |
loops | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
containers | 28.6 | 47.8 | 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 |
control_flow | 0 | 12 | 0.000 |
fib_iter | 0 | 12 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
loops | 0 | 8 | 0.000 |
modules | 0 | 8 | 0.000 |
scoped_resource | 0 | 12 | 0.000 |
tuple_return_value | 0 | 12 | 0.000 |
containers | 5 | 32 | 0.165 |
classes | 3 | 15 | 0.211 |
length | 4 | 12 | 0.311 |
parse | 4 | 8 | 0.459 |
files | 4 | 4 | 0.934 |
escape | 8 | 8 | 0.972 |
cartesian | 4 | 4 | 1.021 |
varargs | 60 | 45 | 1.345 |
cgi | 0 | 0 | NA |