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 | 894 | 0.004 |
modules | 2 | 176 | 0.010 |
fib_recursive | 11 | 871 | 0.012 |
loops | 4 | 288 | 0.013 |
asdl_generated | 7 | 382 | 0.019 |
parse | 29 | 777 | 0.038 |
scoped_resource | 43 | 1,025 | 0.042 |
files | 4 | 76 | 0.050 |
tuple_return_value | 16 | 185 | 0.087 |
containers | 11 | 112 | 0.103 |
length | 45 | 202 | 0.223 |
cartesian | 86 | 340 | 0.253 |
escape | 91 | 335 | 0.272 |
classes | 3 | 12 | 0.285 |
cgi | 260 | 505 | 0.514 |
varargs | 21 | 16 | 1.284 |
control_flow | 213 | 107 | 1.989 |
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 |
escape | 3.5 | 7.1 | 0.50 |
parse | 3.8 | 7.6 | 0.50 |
cartesian | 3.5 | 6.9 | 0.51 |
fib_iter | 3.7 | 7.1 | 0.52 |
scoped_resource | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
fib_recursive | 3.7 | 6.9 | 0.53 |
loops | 3.8 | 7.1 | 0.54 |
control_flow | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
length | 3.8 | 6.8 | 0.56 |
containers | 28.5 | 47.8 | 0.59 |
varargs | 5.6 | 7.1 | 0.80 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
classes | 0 | 19 | 0.000 |
control_flow | 0 | 8 | 0.000 |
fib_recursive | 0 | 12 | 0.000 |
length | 0 | 12 | 0.000 |
loops | 0 | 8 | 0.000 |
modules | 0 | 8 | 0.000 |
parse | 0 | 12 | 0.000 |
containers | 4 | 28 | 0.137 |
scoped_resource | 4 | 8 | 0.487 |
tuple_return_value | 4 | 8 | 0.502 |
varargs | 46 | 56 | 0.807 |
asdl_generated | 4 | 4 | 0.893 |
fib_iter | 4 | 4 | 0.951 |
cgi | 8 | 8 | 0.997 |
cartesian | 4 | 4 | 1.026 |
escape | 16 | 12 | 1.327 |
files | 4 | 0 | inf |