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 | 897 | 0.009 |
asdl_generated | 4 | 381 | 0.010 |
modules | 2 | 179 | 0.010 |
fib_recursive | 11 | 892 | 0.012 |
loops | 4 | 295 | 0.014 |
parse | 30 | 768 | 0.039 |
scoped_resource | 43 | 1,010 | 0.043 |
files | 4 | 70 | 0.057 |
tuple_return_value | 14 | 179 | 0.078 |
containers | 16 | 120 | 0.134 |
classes | 3 | 22 | 0.150 |
cartesian | 79 | 353 | 0.224 |
length | 45 | 199 | 0.229 |
escape | 103 | 348 | 0.295 |
cgi | 265 | 508 | 0.522 |
varargs | 20 | 24 | 0.810 |
control_flow | 209 | 105 | 2.001 |
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 |
asdl_generated | 3.5 | 7.1 | 0.50 |
parse | 3.9 | 7.6 | 0.52 |
loops | 3.8 | 7.2 | 0.53 |
cartesian | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
fib_iter | 3.7 | 6.9 | 0.53 |
tuple_return_value | 3.7 | 6.9 | 0.53 |
length | 3.8 | 7.1 | 0.54 |
fib_recursive | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.9 | 0.55 |
scoped_resource | 3.8 | 6.9 | 0.55 |
control_flow | 3.9 | 6.9 | 0.57 |
containers | 28.6 | 47.8 | 0.60 |
varargs | 5.5 | 6.8 | 0.81 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
classes | 0 | 11 | 0.000 |
containers | 0 | 20 | 0.000 |
control_flow | 0 | 12 | 0.000 |
fib_iter | 0 | 4 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
length | 0 | 12 | 0.000 |
loops | 0 | 8 | 0.000 |
modules | 0 | 4 | 0.000 |
tuple_return_value | 7 | 16 | 0.436 |
scoped_resource | 4 | 8 | 0.493 |
cgi | 4 | 8 | 0.502 |
files | 4 | 8 | 0.513 |
escape | 4 | 8 | 0.514 |
varargs | 47 | 49 | 0.972 |
cartesian | 12 | 8 | 1.479 |
asdl_generated | 7 | 0 | inf |
parse | 0 | 0 | NA |