Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
loops | 0 | 288 | 0.000 |
fib_iter | 8 | 1,241 | 0.006 |
modules | 2 | 171 | 0.011 |
fib_recursive | 11 | 895 | 0.012 |
asdl_generated | 7 | 375 | 0.019 |
parse | 26 | 770 | 0.033 |
scoped_resource | 40 | 1,026 | 0.039 |
files | 4 | 69 | 0.054 |
containers | 8 | 113 | 0.069 |
tuple_return_value | 16 | 184 | 0.088 |
classes | 3 | 23 | 0.142 |
length | 41 | 214 | 0.190 |
escape | 94 | 346 | 0.271 |
cartesian | 89 | 324 | 0.274 |
cgi | 265 | 511 | 0.519 |
varargs | 20 | 12 | 1.621 |
control_flow | 212 | 110 | 1.918 |
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 |
cgi | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.5 | 6.8 | 0.52 |
cartesian | 3.7 | 6.9 | 0.53 |
control_flow | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
tuple_return_value | 3.7 | 6.9 | 0.53 |
fib_iter | 3.8 | 7.1 | 0.54 |
loops | 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 |
scoped_resource | 3.8 | 6.9 | 0.55 |
containers | 28.6 | 47.7 | 0.60 |
varargs | 5.5 | 6.8 | 0.81 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
classes | 0 | 8 | 0.000 |
control_flow | 0 | 4 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
modules | 0 | 12 | 0.000 |
parse | 4 | 12 | 0.305 |
loops | 4 | 12 | 0.320 |
containers | 8 | 24 | 0.320 |
files | 4 | 8 | 0.460 |
cgi | 4 | 8 | 0.503 |
tuple_return_value | 4 | 8 | 0.503 |
varargs | 47 | 60 | 0.778 |
asdl_generated | 4 | 4 | 0.902 |
cartesian | 4 | 4 | 1.008 |
scoped_resource | 8 | 4 | 1.987 |
escape | 12 | 4 | 3.073 |
length | 4 | 0 | inf |