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 | 892 | 0.009 |
modules | 2 | 190 | 0.010 |
fib_recursive | 11 | 898 | 0.012 |
loops | 4 | 297 | 0.012 |
asdl_generated | 7 | 378 | 0.019 |
parse | 22 | 754 | 0.030 |
scoped_resource | 47 | 1,016 | 0.046 |
tuple_return_value | 14 | 182 | 0.074 |
files | 8 | 73 | 0.104 |
containers | 12 | 109 | 0.110 |
classes | 3 | 26 | 0.123 |
length | 41 | 200 | 0.205 |
cartesian | 79 | 325 | 0.242 |
escape | 99 | 344 | 0.286 |
cgi | 265 | 508 | 0.522 |
varargs | 19 | 28 | 0.678 |
control_flow | 208 | 116 | 1.784 |
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 |
scoped_resource | 3.5 | 7.1 | 0.50 |
fib_iter | 3.5 | 6.9 | 0.51 |
loops | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cartesian | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
control_flow | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
files | 3.7 | 6.9 | 0.53 |
modules | 3.8 | 7.1 | 0.54 |
fib_recursive | 3.8 | 6.9 | 0.55 |
length | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
containers | 28.6 | 47.8 | 0.60 |
varargs | 5.6 | 6.9 | 0.81 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
classes | 0 | 4 | 0.000 |
fib_iter | 0 | 4 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
files | 0 | 4 | 0.000 |
modules | 0 | 4 | 0.000 |
scoped_resource | 0 | 8 | 0.000 |
containers | 4 | 28 | 0.141 |
length | 4 | 12 | 0.311 |
cgi | 4 | 12 | 0.335 |
parse | 7 | 16 | 0.466 |
tuple_return_value | 7 | 12 | 0.568 |
asdl_generated | 4 | 4 | 0.899 |
escape | 8 | 8 | 0.985 |
varargs | 46 | 44 | 1.035 |
cartesian | 12 | 8 | 1.491 |
control_flow | 4 | 0 | inf |
loops | 0 | 0 | NA |