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 | 883 | 0.008 |
fib_iter | 8 | 886 | 0.009 |
modules | 2 | 185 | 0.010 |
loops | 4 | 286 | 0.013 |
asdl_generated | 11 | 378 | 0.029 |
parse | 26 | 749 | 0.034 |
scoped_resource | 48 | 1,028 | 0.046 |
files | 4 | 68 | 0.055 |
containers | 8 | 98 | 0.079 |
tuple_return_value | 20 | 183 | 0.110 |
length | 44 | 203 | 0.216 |
classes | 3 | 14 | 0.225 |
cartesian | 83 | 324 | 0.256 |
escape | 101 | 360 | 0.281 |
cgi | 266 | 506 | 0.525 |
varargs | 20 | 12 | 1.729 |
control_flow | 205 | 106 | 1.930 |
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.8 | 0.41 |
parse | 3.8 | 7.6 | 0.50 |
cgi | 3.5 | 6.9 | 0.51 |
length | 3.7 | 7.1 | 0.52 |
scoped_resource | 3.7 | 7.1 | 0.52 |
cartesian | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
loops | 3.8 | 7.1 | 0.54 |
modules | 3.8 | 7.1 | 0.54 |
fib_iter | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
asdl_generated | 3.7 | 6.7 | 0.55 |
tuple_return_value | 3.8 | 6.8 | 0.56 |
control_flow | 3.9 | 6.9 | 0.57 |
containers | 28.6 | 47.6 | 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 |
cgi | 0 | 8 | 0.000 |
classes | 0 | 18 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
length | 0 | 4 | 0.000 |
loops | 0 | 8 | 0.000 |
tuple_return_value | 0 | 12 | 0.000 |
containers | 8 | 37 | 0.210 |
parse | 4 | 12 | 0.306 |
fib_recursive | 4 | 8 | 0.447 |
files | 4 | 8 | 0.470 |
control_flow | 4 | 8 | 0.501 |
cartesian | 8 | 12 | 0.659 |
varargs | 45 | 59 | 0.761 |
escape | 8 | 0 | inf |
modules | 0 | 0 | NA |
scoped_resource | 0 | 0 | NA |