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 | 4 | 902 | 0.004 |
modules | 2 | 172 | 0.011 |
fib_recursive | 11 | 876 | 0.012 |
loops | 4 | 292 | 0.013 |
asdl_generated | 11 | 370 | 0.029 |
parse | 30 | 774 | 0.038 |
scoped_resource | 43 | 1,024 | 0.042 |
files | 8 | 80 | 0.100 |
tuple_return_value | 20 | 191 | 0.105 |
classes | 3 | 25 | 0.131 |
containers | 16 | 113 | 0.140 |
length | 45 | 206 | 0.217 |
cartesian | 78 | 329 | 0.236 |
escape | 98 | 349 | 0.280 |
cgi | 261 | 508 | 0.514 |
varargs | 24 | 36 | 0.656 |
control_flow | 204 | 106 | 1.921 |
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 |
cartesian | 3.7 | 7.1 | 0.52 |
escape | 3.7 | 7.1 | 0.52 |
fib_iter | 3.7 | 6.9 | 0.53 |
length | 3.8 | 7.1 | 0.54 |
loops | 3.8 | 7.1 | 0.54 |
modules | 3.8 | 7.1 | 0.54 |
scoped_resource | 3.8 | 7.1 | 0.54 |
asdl_generated | 3.7 | 6.8 | 0.54 |
control_flow | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.9 | 7.1 | 0.56 |
tuple_return_value | 3.8 | 6.8 | 0.56 |
containers | 28.5 | 47.8 | 0.60 |
varargs | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 8 | 0.000 |
classes | 0 | 7 | 0.000 |
containers | 0 | 24 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
length | 0 | 4 | 0.000 |
loops | 0 | 8 | 0.000 |
modules | 0 | 12 | 0.000 |
parse | 0 | 4 | 0.000 |
tuple_return_value | 0 | 4 | 0.000 |
control_flow | 4 | 8 | 0.508 |
scoped_resource | 4 | 4 | 0.976 |
cgi | 8 | 8 | 0.988 |
fib_iter | 4 | 4 | 1.001 |
varargs | 43 | 36 | 1.202 |
cartesian | 16 | 12 | 1.308 |
escape | 8 | 4 | 2.027 |
files | 0 | 0 | NA |