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 | 290 | 0.000 |
fib_iter | 4 | 919 | 0.004 |
modules | 2 | 171 | 0.010 |
fib_recursive | 11 | 892 | 0.012 |
asdl_generated | 11 | 379 | 0.030 |
parse | 29 | 772 | 0.038 |
scoped_resource | 48 | 1,019 | 0.047 |
files | 4 | 64 | 0.062 |
containers | 8 | 114 | 0.068 |
tuple_return_value | 21 | 193 | 0.108 |
classes | 3 | 27 | 0.128 |
length | 32 | 209 | 0.156 |
cartesian | 83 | 333 | 0.251 |
escape | 105 | 345 | 0.306 |
cgi | 260 | 505 | 0.514 |
varargs | 13 | 12 | 1.045 |
control_flow | 207 | 107 | 1.939 |
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.5 | 0.42 |
parse | 3.8 | 7.6 | 0.50 |
escape | 3.5 | 6.9 | 0.51 |
fib_iter | 3.7 | 7.1 | 0.52 |
loops | 3.7 | 7.1 | 0.52 |
modules | 3.7 | 7.1 | 0.52 |
tuple_return_value | 3.5 | 6.8 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
length | 3.7 | 6.9 | 0.53 |
scoped_resource | 3.7 | 6.9 | 0.53 |
fib_recursive | 3.8 | 7.1 | 0.54 |
cartesian | 3.7 | 6.8 | 0.54 |
control_flow | 3.9 | 6.9 | 0.57 |
files | 3.9 | 6.9 | 0.57 |
containers | 28.6 | 47.8 | 0.60 |
varargs | 5.6 | 7.1 | 0.80 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 4 | 0.000 |
classes | 0 | 4 | 0.000 |
escape | 0 | 8 | 0.000 |
modules | 0 | 12 | 0.000 |
parse | 0 | 8 | 0.000 |
scoped_resource | 0 | 8 | 0.000 |
tuple_return_value | 0 | 4 | 0.000 |
files | 4 | 12 | 0.330 |
containers | 8 | 20 | 0.382 |
control_flow | 4 | 8 | 0.485 |
varargs | 54 | 60 | 0.906 |
fib_iter | 4 | 4 | 1.017 |
loops | 5 | 4 | 1.123 |
cartesian | 8 | 4 | 1.981 |
cgi | 8 | 4 | 1.993 |
length | 12 | 4 | 3.035 |
fib_recursive | 0 | 0 | NA |