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_recursive | 7 | 878 | 0.008 |
fib_iter | 8 | 891 | 0.008 |
modules | 2 | 178 | 0.010 |
loops | 4 | 293 | 0.013 |
asdl_generated | 7 | 377 | 0.019 |
parse | 30 | 756 | 0.039 |
scoped_resource | 47 | 1,051 | 0.044 |
containers | 4 | 84 | 0.046 |
tuple_return_value | 20 | 201 | 0.101 |
files | 7 | 68 | 0.109 |
classes | 3 | 26 | 0.120 |
length | 37 | 201 | 0.186 |
varargs | 4 | 20 | 0.195 |
cartesian | 83 | 335 | 0.246 |
escape | 105 | 350 | 0.299 |
cgi | 261 | 506 | 0.515 |
control_flow | 210 | 103 | 2.044 |
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 |
parse | 3.8 | 7.6 | 0.50 |
asdl_generated | 3.5 | 6.9 | 0.51 |
cartesian | 3.5 | 6.8 | 0.52 |
cgi | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
modules | 3.7 | 6.9 | 0.53 |
files | 3.8 | 7.1 | 0.54 |
length | 3.8 | 7.1 | 0.54 |
loops | 3.8 | 7.1 | 0.54 |
scoped_resource | 3.8 | 7.1 | 0.54 |
fib_iter | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.9 | 0.55 |
control_flow | 3.9 | 6.9 | 0.57 |
tuple_return_value | 3.9 | 6.9 | 0.57 |
containers | 28.7 | 47.8 | 0.60 |
varargs | 5.6 | 7.1 | 0.80 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
classes | 0 | 4 | 0.000 |
control_flow | 0 | 8 | 0.000 |
fib_iter | 0 | 4 | 0.000 |
files | 0 | 8 | 0.000 |
loops | 0 | 8 | 0.000 |
modules | 0 | 8 | 0.000 |
parse | 0 | 16 | 0.000 |
scoped_resource | 0 | 8 | 0.000 |
containers | 12 | 48 | 0.242 |
fib_recursive | 4 | 8 | 0.446 |
cgi | 8 | 12 | 0.671 |
asdl_generated | 4 | 4 | 0.903 |
length | 7 | 8 | 0.949 |
escape | 4 | 4 | 1.001 |
varargs | 62 | 51 | 1.203 |
cartesian | 8 | 4 | 1.970 |
tuple_return_value | 0 | 0 | NA |