Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
classes | 0 | 20 | 0.000 |
fib_recursive | 7 | 970 | 0.008 |
fib_iter | 8 | 880 | 0.009 |
modules | 2 | 178 | 0.010 |
loops | 4 | 283 | 0.014 |
asdl_generated | 11 | 378 | 0.030 |
parse | 26 | 801 | 0.032 |
scoped_resource | 44 | 1,036 | 0.042 |
files | 7 | 74 | 0.101 |
containers | 12 | 113 | 0.104 |
tuple_return_value | 20 | 185 | 0.109 |
length | 33 | 204 | 0.164 |
cartesian | 85 | 353 | 0.239 |
escape | 102 | 363 | 0.281 |
cgi | 237 | 515 | 0.461 |
varargs | 16 | 20 | 0.778 |
control_flow | 210 | 111 | 1.899 |
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.7 | 0.49 |
cartesian | 3.5 | 6.9 | 0.51 |
cgi | 3.5 | 6.9 | 0.51 |
scoped_resource | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
files | 3.7 | 6.9 | 0.53 |
length | 3.7 | 6.9 | 0.53 |
loops | 3.7 | 6.9 | 0.53 |
fib_recursive | 3.8 | 7.1 | 0.54 |
modules | 3.8 | 7.1 | 0.54 |
fib_iter | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
control_flow | 3.9 | 6.9 | 0.57 |
containers | 28.4 | 47.7 | 0.60 |
varargs | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 4 | 0.000 |
control_flow | 0 | 4 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
files | 0 | 4 | 0.000 |
loops | 0 | 12 | 0.000 |
modules | 0 | 4 | 0.000 |
tuple_return_value | 0 | 8 | 0.000 |
containers | 4 | 27 | 0.144 |
classes | 3 | 12 | 0.276 |
fib_recursive | 4 | 12 | 0.313 |
scoped_resource | 4 | 12 | 0.332 |
parse | 4 | 4 | 0.925 |
varargs | 52 | 53 | 0.973 |
escape | 4 | 4 | 0.984 |
length | 11 | 8 | 1.397 |
cgi | 16 | 8 | 2.015 |
cartesian | 8 | 0 | inf |