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 | 886 | 0.009 |
modules | 2 | 182 | 0.010 |
fib_recursive | 11 | 876 | 0.012 |
loops | 4 | 287 | 0.013 |
asdl_generated | 11 | 393 | 0.027 |
containers | 4 | 122 | 0.032 |
parse | 25 | 753 | 0.033 |
scoped_resource | 40 | 1,025 | 0.039 |
files | 8 | 76 | 0.103 |
tuple_return_value | 20 | 191 | 0.106 |
classes | 3 | 27 | 0.119 |
length | 46 | 205 | 0.222 |
cartesian | 86 | 332 | 0.260 |
escape | 107 | 347 | 0.308 |
cgi | 247 | 510 | 0.485 |
varargs | 27 | 16 | 1.695 |
control_flow | 210 | 104 | 2.024 |
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.8 | 0.40 |
cgi | 3.4 | 6.9 | 0.49 |
parse | 3.8 | 7.6 | 0.50 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cartesian | 3.7 | 6.9 | 0.53 |
control_flow | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
fib_iter | 3.7 | 6.9 | 0.53 |
loops | 3.8 | 7.1 | 0.54 |
scoped_resource | 3.8 | 7.1 | 0.54 |
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 |
containers | 28.7 | 47.8 | 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 |
classes | 0 | 4 | 0.000 |
control_flow | 0 | 12 | 0.000 |
escape | 0 | 4 | 0.000 |
fib_iter | 0 | 12 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
length | 0 | 4 | 0.000 |
loops | 0 | 8 | 0.000 |
tuple_return_value | 0 | 4 | 0.000 |
cgi | 4 | 8 | 0.501 |
parse | 4 | 8 | 0.524 |
varargs | 39 | 56 | 0.692 |
containers | 12 | 16 | 0.743 |
cartesian | 4 | 4 | 0.982 |
scoped_resource | 8 | 8 | 0.999 |
files | 0 | 0 | NA |
modules | 0 | 0 | NA |