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_recursive | 7 | 879 | 0.008 |
fib_iter | 8 | 894 | 0.008 |
modules | 2 | 179 | 0.010 |
loops | 4 | 306 | 0.012 |
asdl_generated | 11 | 372 | 0.029 |
parse | 22 | 775 | 0.029 |
scoped_resource | 43 | 1,139 | 0.038 |
containers | 8 | 110 | 0.070 |
tuple_return_value | 14 | 184 | 0.073 |
files | 8 | 73 | 0.103 |
length | 40 | 195 | 0.205 |
classes | 3 | 16 | 0.206 |
cartesian | 87 | 326 | 0.266 |
escape | 103 | 344 | 0.298 |
cgi | 268 | 513 | 0.523 |
varargs | 8 | 12 | 0.650 |
control_flow | 212 | 101 | 2.108 |
Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).
example name | C++ | Python | C++ : Python |
classes | 4.3 | 10.7 | 0.40 |
modules | 3.5 | 7.1 | 0.50 |
parse | 3.9 | 7.7 | 0.51 |
cartesian | 3.5 | 6.9 | 0.51 |
escape | 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 |
fib_iter | 3.8 | 7.1 | 0.54 |
fib_recursive | 3.8 | 7.1 | 0.54 |
loops | 3.8 | 7.1 | 0.54 |
control_flow | 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 |
containers | 28.4 | 47.8 | 0.59 |
varargs | 5.6 | 6.9 | 0.81 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 12 | 0.000 |
cgi | 0 | 8 | 0.000 |
classes | 0 | 16 | 0.000 |
control_flow | 0 | 12 | 0.000 |
fib_iter | 0 | 4 | 0.000 |
files | 0 | 4 | 0.000 |
loops | 0 | 4 | 0.000 |
modules | 0 | 4 | 0.000 |
containers | 8 | 25 | 0.315 |
length | 4 | 12 | 0.335 |
cartesian | 4 | 8 | 0.496 |
tuple_return_value | 7 | 8 | 0.845 |
fib_recursive | 4 | 4 | 0.904 |
parse | 7 | 8 | 0.937 |
scoped_resource | 4 | 4 | 0.972 |
varargs | 58 | 60 | 0.976 |
escape | 4 | 4 | 0.987 |