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 | 184 | 0.012 |
fib_recursive | 11 | 895 | 0.012 |
loops | 4 | 293 | 0.013 |
asdl_generated | 11 | 378 | 0.028 |
containers | 4 | 114 | 0.033 |
parse | 29 | 778 | 0.038 |
scoped_resource | 44 | 1,039 | 0.042 |
files | 7 | 71 | 0.104 |
tuple_return_value | 20 | 190 | 0.106 |
length | 37 | 204 | 0.179 |
classes | 3 | 15 | 0.213 |
cartesian | 81 | 326 | 0.248 |
escape | 104 | 358 | 0.291 |
cgi | 265 | 514 | 0.516 |
varargs | 15 | 23 | 0.668 |
control_flow | 202 | 105 | 1.918 |
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 |
parse | 3.8 | 7.6 | 0.50 |
asdl_generated | 3.5 | 6.9 | 0.51 |
cartesian | 3.5 | 6.9 | 0.51 |
cgi | 3.5 | 6.9 | 0.51 |
modules | 3.7 | 7.1 | 0.52 |
tuple_return_value | 3.7 | 7.1 | 0.52 |
escape | 3.7 | 6.9 | 0.53 |
files | 3.7 | 6.9 | 0.53 |
length | 3.7 | 6.9 | 0.53 |
loops | 3.8 | 7.1 | 0.54 |
control_flow | 3.8 | 6.9 | 0.55 |
fib_iter | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.9 | 0.55 |
scoped_resource | 3.8 | 6.9 | 0.55 |
containers | 28.5 | 47.7 | 0.60 |
varargs | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 4 | 0.000 |
cgi | 0 | 8 | 0.000 |
classes | 0 | 15 | 0.000 |
fib_iter | 0 | 4 | 0.000 |
fib_recursive | 0 | 4 | 0.000 |
files | 0 | 4 | 0.000 |
loops | 0 | 4 | 0.000 |
modules | 0 | 4 | 0.000 |
parse | 0 | 8 | 0.000 |
tuple_return_value | 0 | 4 | 0.000 |
control_flow | 4 | 12 | 0.338 |
containers | 11 | 24 | 0.462 |
scoped_resource | 4 | 4 | 0.991 |
varargs | 50 | 50 | 1.002 |
cartesian | 8 | 8 | 1.018 |
length | 8 | 4 | 2.027 |
escape | 4 | 0 | inf |