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 | 886 | 0.008 |
fib_iter | 8 | 895 | 0.009 |
modules | 2 | 175 | 0.010 |
loops | 4 | 300 | 0.013 |
asdl_generated | 11 | 393 | 0.028 |
parse | 26 | 861 | 0.030 |
containers | 4 | 133 | 0.030 |
scoped_resource | 37 | 1,046 | 0.036 |
tuple_return_value | 20 | 186 | 0.107 |
files | 8 | 68 | 0.112 |
classes | 3 | 23 | 0.141 |
length | 41 | 195 | 0.211 |
cartesian | 76 | 322 | 0.235 |
escape | 95 | 354 | 0.268 |
cgi | 252 | 505 | 0.499 |
varargs | 28 | 24 | 1.154 |
control_flow | 210 | 109 | 1.935 |
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.6 | 0.42 |
fib_iter | 3.4 | 7.1 | 0.48 |
asdl_generated | 3.5 | 7.1 | 0.50 |
scoped_resource | 3.5 | 7.1 | 0.50 |
cartesian | 3.5 | 6.9 | 0.51 |
cgi | 3.5 | 6.9 | 0.51 |
parse | 3.9 | 7.6 | 0.52 |
loops | 3.7 | 7.1 | 0.52 |
escape | 3.5 | 6.8 | 0.52 |
files | 3.7 | 6.9 | 0.53 |
length | 3.7 | 6.9 | 0.53 |
modules | 3.7 | 6.9 | 0.53 |
fib_recursive | 3.8 | 7.1 | 0.54 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
control_flow | 3.9 | 6.9 | 0.57 |
containers | 28.6 | 47.8 | 0.60 |
varargs | 5.6 | 6.9 | 0.81 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 4 | 0.000 |
classes | 0 | 8 | 0.000 |
control_flow | 0 | 4 | 0.000 |
fib_iter | 0 | 12 | 0.000 |
files | 0 | 8 | 0.000 |
loops | 0 | 4 | 0.000 |
modules | 0 | 8 | 0.000 |
tuple_return_value | 0 | 8 | 0.000 |
length | 4 | 12 | 0.314 |
cgi | 4 | 12 | 0.335 |
varargs | 40 | 48 | 0.824 |
fib_recursive | 4 | 4 | 0.901 |
cartesian | 16 | 12 | 1.336 |
containers | 12 | 8 | 1.507 |
scoped_resource | 11 | 4 | 2.794 |
escape | 12 | 4 | 2.948 |
parse | 4 | 0 | inf |