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 | 4 | 898 | 0.004 |
modules | 2 | 178 | 0.010 |
loops | 4 | 300 | 0.012 |
fib_recursive | 11 | 873 | 0.012 |
asdl_generated | 11 | 374 | 0.029 |
parse | 26 | 815 | 0.032 |
scoped_resource | 47 | 1,017 | 0.047 |
files | 4 | 73 | 0.053 |
containers | 8 | 111 | 0.072 |
tuple_return_value | 16 | 185 | 0.088 |
classes | 3 | 23 | 0.141 |
length | 44 | 203 | 0.215 |
cartesian | 87 | 330 | 0.263 |
escape | 101 | 344 | 0.293 |
cgi | 265 | 508 | 0.521 |
varargs | 27 | 24 | 1.145 |
control_flow | 210 | 110 | 1.906 |
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.6 | 0.42 |
cartesian | 3.5 | 7.1 | 0.50 |
parse | 3.8 | 7.6 | 0.50 |
fib_iter | 3.5 | 6.9 | 0.51 |
escape | 3.7 | 7.1 | 0.52 |
loops | 3.7 | 7.1 | 0.52 |
scoped_resource | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
tuple_return_value | 3.8 | 7.1 | 0.54 |
fib_recursive | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
length | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.9 | 0.55 |
control_flow | 3.9 | 6.9 | 0.57 |
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 |
classes | 0 | 8 | 0.000 |
control_flow | 0 | 4 | 0.000 |
fib_recursive | 0 | 12 | 0.000 |
length | 0 | 8 | 0.000 |
loops | 0 | 4 | 0.000 |
modules | 0 | 4 | 0.000 |
scoped_resource | 0 | 8 | 0.000 |
containers | 8 | 24 | 0.337 |
fib_iter | 4 | 8 | 0.472 |
cgi | 4 | 8 | 0.502 |
tuple_return_value | 4 | 8 | 0.504 |
escape | 4 | 8 | 0.504 |
varargs | 39 | 48 | 0.818 |
parse | 4 | 4 | 0.924 |
files | 4 | 4 | 0.951 |
cartesian | 4 | 4 | 0.992 |