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 | 8 | 883 | 0.009 |
modules | 2 | 172 | 0.010 |
fib_recursive | 11 | 884 | 0.012 |
loops | 4 | 290 | 0.013 |
asdl_generated | 11 | 385 | 0.028 |
containers | 4 | 106 | 0.036 |
parse | 29 | 777 | 0.037 |
scoped_resource | 44 | 1,048 | 0.041 |
files | 4 | 72 | 0.052 |
tuple_return_value | 16 | 189 | 0.085 |
classes | 3 | 19 | 0.165 |
length | 40 | 208 | 0.192 |
cartesian | 90 | 331 | 0.272 |
escape | 99 | 353 | 0.280 |
cgi | 265 | 505 | 0.524 |
varargs | 25 | 16 | 1.538 |
control_flow | 210 | 109 | 1.923 |
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 |
cartesian | 3.5 | 7.1 | 0.50 |
scoped_resource | 3.5 | 7.1 | 0.50 |
parse | 3.9 | 7.6 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
loops | 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 |
length | 3.8 | 6.9 | 0.55 |
modules | 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.5 | 47.8 | 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 |
cartesian | 0 | 4 | 0.000 |
classes | 0 | 11 | 0.000 |
control_flow | 0 | 8 | 0.000 |
fib_iter | 0 | 12 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
loops | 0 | 4 | 0.000 |
modules | 0 | 12 | 0.000 |
parse | 0 | 12 | 0.000 |
containers | 11 | 27 | 0.415 |
cgi | 4 | 8 | 0.505 |
varargs | 41 | 56 | 0.732 |
files | 4 | 4 | 0.934 |
escape | 8 | 8 | 0.985 |
scoped_resource | 4 | 4 | 0.988 |
length | 4 | 4 | 0.998 |
tuple_return_value | 4 | 4 | 1.002 |