Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
containers | 0 | 110 | 0.000 |
files | 0 | 69 | 0.000 |
loops | 0 | 288 | 0.000 |
modules | 0 | 170 | 0.000 |
fib_iter | 8 | 899 | 0.008 |
fib_recursive | 11 | 882 | 0.012 |
asdl_generated | 7 | 375 | 0.019 |
parse | 29 | 755 | 0.039 |
scoped_resource | 39 | 1,008 | 0.039 |
tuple_return_value | 20 | 187 | 0.107 |
classes | 3 | 20 | 0.161 |
length | 44 | 200 | 0.218 |
cartesian | 82 | 339 | 0.243 |
escape | 99 | 346 | 0.286 |
cgi | 254 | 508 | 0.499 |
varargs | 29 | 28 | 1.032 |
control_flow | 213 | 109 | 1.949 |
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.7 | 0.49 |
cartesian | 3.5 | 7.1 | 0.50 |
fib_recursive | 3.5 | 6.9 | 0.51 |
asdl_generated | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
tuple_return_value | 3.7 | 6.9 | 0.53 |
scoped_resource | 3.8 | 7.1 | 0.54 |
cgi | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
length | 3.8 | 6.9 | 0.55 |
loops | 3.8 | 6.9 | 0.55 |
fib_iter | 3.8 | 6.8 | 0.56 |
control_flow | 3.9 | 6.9 | 0.57 |
modules | 3.9 | 6.9 | 0.57 |
containers | 28.5 | 47.7 | 0.60 |
varargs | 5.4 | 6.9 | 0.77 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
cgi | 0 | 4 | 0.000 |
classes | 0 | 12 | 0.000 |
control_flow | 0 | 8 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
fib_recursive | 0 | 4 | 0.000 |
length | 0 | 8 | 0.000 |
parse | 0 | 4 | 0.000 |
tuple_return_value | 0 | 8 | 0.000 |
modules | 2 | 12 | 0.150 |
loops | 4 | 8 | 0.450 |
scoped_resource | 8 | 12 | 0.658 |
containers | 15 | 20 | 0.776 |
varargs | 37 | 44 | 0.844 |
asdl_generated | 4 | 4 | 0.897 |
files | 7 | 8 | 0.909 |
escape | 4 | 4 | 0.996 |
cartesian | 8 | 4 | 2.066 |