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 | 293 | 0.000 |
fib_recursive | 7 | 897 | 0.008 |
fib_iter | 8 | 892 | 0.009 |
modules | 2 | 186 | 0.009 |
asdl_generated | 11 | 383 | 0.028 |
parse | 26 | 751 | 0.035 |
scoped_resource | 43 | 1,041 | 0.042 |
files | 4 | 70 | 0.053 |
containers | 8 | 113 | 0.069 |
tuple_return_value | 20 | 184 | 0.110 |
classes | 3 | 24 | 0.138 |
length | 40 | 206 | 0.196 |
cartesian | 85 | 340 | 0.249 |
escape | 91 | 348 | 0.262 |
cgi | 261 | 505 | 0.517 |
varargs | 23 | 24 | 0.978 |
control_flow | 209 | 110 | 1.890 |
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 |
modules | 3.5 | 6.9 | 0.51 |
parse | 3.9 | 7.6 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cartesian | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
tuple_return_value | 3.7 | 6.9 | 0.53 |
control_flow | 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 |
files | 3.8 | 6.9 | 0.55 |
containers | 28.7 | 47.8 | 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 |
classes | 0 | 8 | 0.000 |
control_flow | 0 | 8 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
tuple_return_value | 0 | 12 | 0.000 |
containers | 8 | 24 | 0.324 |
length | 4 | 8 | 0.455 |
parse | 4 | 8 | 0.468 |
files | 4 | 8 | 0.480 |
loops | 4 | 8 | 0.483 |
cgi | 8 | 12 | 0.663 |
varargs | 43 | 48 | 0.896 |
escape | 16 | 8 | 1.980 |
cartesian | 8 | 4 | 2.020 |
fib_recursive | 4 | 0 | inf |
scoped_resource | 4 | 0 | inf |
modules | 0 | 0 | NA |