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 | 890 | 0.009 |
modules | 2 | 182 | 0.010 |
fib_recursive | 11 | 901 | 0.012 |
loops | 4 | 294 | 0.013 |
asdl_generated | 7 | 380 | 0.019 |
scoped_resource | 36 | 1,024 | 0.035 |
parse | 29 | 755 | 0.039 |
containers | 8 | 98 | 0.081 |
tuple_return_value | 20 | 188 | 0.109 |
files | 8 | 68 | 0.113 |
classes | 3 | 26 | 0.126 |
length | 44 | 208 | 0.211 |
cartesian | 78 | 337 | 0.232 |
escape | 91 | 344 | 0.265 |
varargs | 8 | 16 | 0.514 |
cgi | 263 | 507 | 0.519 |
control_flow | 207 | 117 | 1.776 |
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 |
parse | 3.8 | 7.5 | 0.51 |
loops | 3.7 | 7.2 | 0.51 |
cartesian | 3.5 | 6.9 | 0.51 |
cgi | 3.5 | 6.9 | 0.51 |
length | 3.5 | 6.9 | 0.51 |
asdl_generated | 3.7 | 7.1 | 0.52 |
escape | 3.7 | 6.9 | 0.53 |
scoped_resource | 3.8 | 7.1 | 0.54 |
control_flow | 3.8 | 6.9 | 0.55 |
fib_iter | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
files | 3.9 | 7.1 | 0.56 |
containers | 28.5 | 47.8 | 0.60 |
varargs | 5.5 | 6.8 | 0.81 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
classes | 0 | 4 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
fib_recursive | 0 | 4 | 0.000 |
files | 0 | 8 | 0.000 |
length | 0 | 4 | 0.000 |
loops | 0 | 8 | 0.000 |
parse | 0 | 8 | 0.000 |
tuple_return_value | 0 | 4 | 0.000 |
containers | 8 | 39 | 0.202 |
cgi | 4 | 12 | 0.333 |
varargs | 58 | 56 | 1.028 |
scoped_resource | 12 | 8 | 1.514 |
cartesian | 12 | 8 | 1.535 |
escape | 16 | 8 | 1.983 |
asdl_generated | 4 | 0 | inf |
control_flow | 4 | 0 | inf |
modules | 0 | 0 | NA |