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 | 185 | 0.010 |
fib_recursive | 11 | 873 | 0.012 |
loops | 4 | 300 | 0.012 |
asdl_generated | 11 | 371 | 0.029 |
parse | 25 | 768 | 0.033 |
scoped_resource | 44 | 1,021 | 0.043 |
files | 4 | 68 | 0.054 |
tuple_return_value | 16 | 185 | 0.087 |
containers | 12 | 105 | 0.114 |
classes | 3 | 27 | 0.118 |
length | 37 | 201 | 0.185 |
escape | 98 | 351 | 0.279 |
cartesian | 92 | 328 | 0.280 |
varargs | 8 | 20 | 0.402 |
cgi | 266 | 508 | 0.524 |
control_flow | 207 | 106 | 1.955 |
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 |
parse | 3.8 | 7.6 | 0.50 |
asdl_generated | 3.5 | 6.9 | 0.51 |
cartesian | 3.5 | 6.9 | 0.51 |
loops | 3.8 | 7.2 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
modules | 3.7 | 6.9 | 0.53 |
tuple_return_value | 3.7 | 6.9 | 0.53 |
scoped_resource | 3.8 | 7.1 | 0.54 |
control_flow | 3.8 | 6.9 | 0.55 |
fib_iter | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.8 | 0.56 |
length | 3.9 | 6.9 | 0.57 |
containers | 28.8 | 47.8 | 0.60 |
varargs | 5.5 | 7.1 | 0.78 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 8 | 0.000 |
cartesian | 0 | 8 | 0.000 |
classes | 0 | 4 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
fib_recursive | 0 | 12 | 0.000 |
loops | 0 | 4 | 0.000 |
containers | 4 | 28 | 0.141 |
files | 4 | 8 | 0.459 |
scoped_resource | 4 | 8 | 0.495 |
cgi | 4 | 8 | 0.504 |
tuple_return_value | 4 | 8 | 0.510 |
control_flow | 4 | 8 | 0.517 |
length | 7 | 8 | 0.942 |
escape | 8 | 8 | 0.981 |
parse | 4 | 4 | 1.061 |
varargs | 60 | 52 | 1.159 |
modules | 0 | 0 | NA |