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 | 5 | 643 | 0.008 |
modules | 1 | 127 | 0.009 |
fib_recursive | 7 | 661 | 0.011 |
loops | 2 | 214 | 0.012 |
scoped_resource | 7 | 555 | 0.012 |
asdl_generated | 7 | 272 | 0.025 |
parse | 20 | 571 | 0.035 |
containers | 5 | 87 | 0.052 |
tuple_return_value | 14 | 134 | 0.102 |
files | 5 | 51 | 0.104 |
length | 28 | 155 | 0.181 |
classes | 2 | 11 | 0.196 |
cartesian | 63 | 248 | 0.253 |
escape | 78 | 262 | 0.298 |
varargs | 8 | 25 | 0.308 |
cgi | 193 | 379 | 0.510 |
control_flow | 152 | 80 | 1.897 |
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.9 | 0.41 |
parse | 3.9 | 7.8 | 0.50 |
asdl_generated | 3.7 | 7.2 | 0.51 |
cgi | 3.7 | 7.1 | 0.52 |
escape | 3.7 | 7.2 | 0.52 |
cartesian | 3.7 | 7.1 | 0.52 |
scoped_resource | 3.8 | 7.2 | 0.53 |
length | 3.8 | 7.2 | 0.53 |
modules | 3.8 | 7.1 | 0.53 |
files | 3.8 | 7.1 | 0.54 |
loops | 4.0 | 7.3 | 0.54 |
fib_iter | 3.9 | 7.1 | 0.54 |
tuple_return_value | 3.8 | 7.0 | 0.54 |
fib_recursive | 3.9 | 7.1 | 0.55 |
control_flow | 3.9 | 7.1 | 0.55 |
containers | 28.5 | 47.8 | 0.60 |
varargs | 5.6 | 7.1 | 0.78 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 4 | 0.000 |
cartesian | 0 | 4 | 0.000 |
classes | 0 | 7 | 0.000 |
fib_recursive | 0 | 4 | 0.000 |
modules | 0 | 4 | 0.000 |
parse | 0 | 4 | 0.000 |
tuple_return_value | 0 | 4 | 0.000 |
containers | 9 | 8 | 1.150 |
varargs | 19 | 4 | 4.625 |
length | 4 | 0 | inf |
cgi | 0 | 0 | NA |
control_flow | 0 | 0 | NA |
escape | 0 | 0 | NA |
fib_iter | 0 | 0 | NA |
files | 0 | 0 | NA |
loops | 0 | 0 | NA |
scoped_resource | 0 | 0 | NA |