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 | 876 | 0.009 |
modules | 2 | 168 | 0.011 |
fib_recursive | 11 | 855 | 0.013 |
loops | 4 | 283 | 0.013 |
asdl_generated | 10 | 377 | 0.027 |
parse | 25 | 758 | 0.033 |
scoped_resource | 37 | 1,001 | 0.037 |
containers | 8 | 116 | 0.065 |
tuple_return_value | 16 | 188 | 0.083 |
files | 7 | 65 | 0.114 |
classes | 3 | 22 | 0.149 |
length | 41 | 195 | 0.209 |
cartesian | 80 | 333 | 0.239 |
escape | 108 | 342 | 0.315 |
cgi | 265 | 512 | 0.517 |
varargs | 20 | 20 | 1.013 |
control_flow | 205 | 109 | 1.885 |
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.7 | 0.41 |
parse | 3.8 | 7.6 | 0.50 |
cartesian | 3.5 | 6.9 | 0.51 |
cgi | 3.5 | 6.9 | 0.51 |
escape | 3.5 | 6.9 | 0.51 |
fib_recursive | 3.5 | 6.9 | 0.51 |
scoped_resource | 3.7 | 7.1 | 0.52 |
fib_iter | 3.7 | 6.9 | 0.53 |
loops | 3.8 | 7.1 | 0.54 |
modules | 3.8 | 7.1 | 0.54 |
asdl_generated | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
length | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
control_flow | 3.9 | 6.9 | 0.57 |
containers | 28.7 | 47.8 | 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 |
classes | 0 | 9 | 0.000 |
control_flow | 0 | 4 | 0.000 |
escape | 0 | 4 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
files | 0 | 8 | 0.000 |
loops | 0 | 4 | 0.000 |
modules | 0 | 12 | 0.000 |
containers | 8 | 16 | 0.472 |
tuple_return_value | 4 | 8 | 0.489 |
length | 4 | 8 | 0.512 |
varargs | 45 | 52 | 0.857 |
parse | 4 | 4 | 1.042 |
cartesian | 8 | 4 | 2.011 |
scoped_resource | 8 | 0 | inf |
cgi | 0 | 0 | NA |