Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
loops | 0 | 290 | 0.000 |
fib_recursive | 7 | 886 | 0.008 |
fib_iter | 8 | 892 | 0.009 |
modules | 2 | 176 | 0.010 |
asdl_generated | 11 | 371 | 0.030 |
parse | 25 | 768 | 0.033 |
scoped_resource | 43 | 1,029 | 0.042 |
files | 4 | 72 | 0.054 |
containers | 12 | 117 | 0.100 |
tuple_return_value | 20 | 188 | 0.108 |
classes | 3 | 24 | 0.147 |
length | 37 | 203 | 0.184 |
cartesian | 83 | 325 | 0.256 |
escape | 101 | 341 | 0.297 |
cgi | 265 | 496 | 0.535 |
varargs | 12 | 12 | 0.983 |
control_flow | 211 | 107 | 1.968 |
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.8 | 0.40 |
asdl_generated | 3.5 | 7.1 | 0.50 |
parse | 3.8 | 7.6 | 0.50 |
cartesian | 3.5 | 6.9 | 0.51 |
cgi | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
fib_recursive | 3.7 | 6.9 | 0.53 |
modules | 3.7 | 6.9 | 0.53 |
loops | 3.8 | 7.1 | 0.54 |
scoped_resource | 3.8 | 7.1 | 0.54 |
control_flow | 3.7 | 6.8 | 0.54 |
fib_iter | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
length | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
containers | 28.5 | 47.7 | 0.60 |
varargs | 5.6 | 7.1 | 0.80 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 12 | 0.000 |
classes | 0 | 8 | 0.000 |
control_flow | 0 | 8 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
modules | 0 | 8 | 0.000 |
tuple_return_value | 0 | 4 | 0.000 |
containers | 4 | 20 | 0.192 |
cgi | 4 | 16 | 0.253 |
fib_recursive | 4 | 4 | 0.896 |
varargs | 55 | 60 | 0.917 |
loops | 4 | 4 | 0.951 |
scoped_resource | 4 | 4 | 0.972 |
files | 4 | 4 | 0.973 |
escape | 8 | 8 | 0.981 |
cartesian | 8 | 8 | 0.987 |
parse | 4 | 4 | 1.058 |
length | 7 | 4 | 1.837 |