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 | 886 | 0.004 |
modules | 2 | 175 | 0.010 |
fib_recursive | 11 | 879 | 0.012 |
loops | 4 | 285 | 0.014 |
asdl_generated | 11 | 380 | 0.029 |
parse | 22 | 756 | 0.030 |
containers | 4 | 100 | 0.040 |
scoped_resource | 47 | 1,022 | 0.046 |
tuple_return_value | 20 | 181 | 0.112 |
files | 8 | 68 | 0.120 |
classes | 3 | 24 | 0.135 |
length | 41 | 198 | 0.206 |
cartesian | 81 | 338 | 0.241 |
escape | 95 | 348 | 0.273 |
cgi | 261 | 502 | 0.521 |
varargs | 16 | 16 | 1.022 |
control_flow | 210 | 110 | 1.905 |
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.9 | 0.41 |
cartesian | 3.4 | 6.9 | 0.49 |
parse | 3.8 | 7.6 | 0.50 |
loops | 3.7 | 7.2 | 0.51 |
scoped_resource | 3.5 | 6.9 | 0.51 |
fib_recursive | 3.5 | 6.8 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
files | 3.7 | 6.9 | 0.53 |
modules | 3.7 | 6.9 | 0.53 |
cgi | 3.8 | 7.1 | 0.54 |
fib_iter | 3.8 | 7.1 | 0.54 |
length | 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.7 | 48.0 | 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 | 8 | 0.000 |
control_flow | 0 | 4 | 0.000 |
fib_recursive | 0 | 4 | 0.000 |
files | 0 | 8 | 0.000 |
loops | 0 | 12 | 0.000 |
modules | 0 | 8 | 0.000 |
scoped_resource | 0 | 16 | 0.000 |
tuple_return_value | 0 | 12 | 0.000 |
containers | 12 | 40 | 0.300 |
cgi | 4 | 12 | 0.337 |
length | 4 | 12 | 0.337 |
fib_iter | 4 | 8 | 0.484 |
parse | 7 | 12 | 0.625 |
varargs | 49 | 56 | 0.876 |
cartesian | 8 | 8 | 0.973 |
escape | 12 | 4 | 2.971 |