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 | 892 | 0.004 |
modules | 2 | 171 | 0.010 |
fib_recursive | 11 | 882 | 0.012 |
loops | 4 | 289 | 0.013 |
asdl_generated | 11 | 384 | 0.028 |
parse | 26 | 786 | 0.033 |
scoped_resource | 43 | 1,019 | 0.043 |
files | 4 | 67 | 0.058 |
tuple_return_value | 16 | 185 | 0.087 |
containers | 16 | 117 | 0.135 |
classes | 3 | 17 | 0.189 |
length | 41 | 200 | 0.203 |
cartesian | 86 | 359 | 0.240 |
escape | 93 | 354 | 0.263 |
cgi | 269 | 532 | 0.505 |
varargs | 24 | 12 | 1.954 |
control_flow | 209 | 103 | 2.028 |
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 |
cgi | 3.5 | 6.9 | 0.51 |
loops | 3.7 | 7.1 | 0.52 |
scoped_resource | 3.7 | 7.1 | 0.52 |
parse | 3.9 | 7.5 | 0.53 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cartesian | 3.7 | 6.9 | 0.53 |
files | 3.7 | 6.9 | 0.53 |
tuple_return_value | 3.7 | 6.9 | 0.53 |
fib_iter | 3.7 | 6.8 | 0.54 |
control_flow | 3.8 | 6.9 | 0.55 |
escape | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.9 | 0.55 |
length | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.9 | 0.55 |
containers | 28.5 | 47.7 | 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 |
cgi | 0 | 4 | 0.000 |
classes | 0 | 13 | 0.000 |
containers | 0 | 20 | 0.000 |
control_flow | 0 | 12 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
loops | 0 | 4 | 0.000 |
modules | 0 | 12 | 0.000 |
length | 4 | 12 | 0.338 |
files | 4 | 8 | 0.467 |
fib_iter | 4 | 8 | 0.476 |
scoped_resource | 4 | 8 | 0.494 |
tuple_return_value | 4 | 8 | 0.501 |
cartesian | 4 | 8 | 0.513 |
varargs | 43 | 61 | 0.716 |
escape | 12 | 0 | inf |
parse | 4 | 0 | inf |