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 | 889 | 0.009 |
modules | 2 | 174 | 0.011 |
fib_recursive | 11 | 897 | 0.012 |
loops | 4 | 298 | 0.012 |
asdl_generated | 11 | 376 | 0.029 |
containers | 4 | 104 | 0.038 |
parse | 30 | 785 | 0.038 |
scoped_resource | 40 | 1,043 | 0.038 |
tuple_return_value | 16 | 191 | 0.085 |
files | 8 | 62 | 0.124 |
length | 33 | 206 | 0.160 |
classes | 3 | 20 | 0.168 |
cartesian | 83 | 329 | 0.251 |
escape | 100 | 348 | 0.289 |
cgi | 246 | 503 | 0.489 |
varargs | 16 | 19 | 0.829 |
control_flow | 208 | 112 | 1.852 |
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.9 | 0.41 |
cartesian | 3.5 | 6.9 | 0.51 |
parse | 3.9 | 7.6 | 0.52 |
fib_recursive | 3.7 | 7.1 | 0.52 |
tuple_return_value | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
modules | 3.7 | 6.9 | 0.53 |
scoped_resource | 3.7 | 6.9 | 0.53 |
length | 3.8 | 7.1 | 0.54 |
loops | 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 |
escape | 3.7 | 6.7 | 0.55 |
containers | 28.5 | 47.8 | 0.60 |
varargs | 5.5 | 7.1 | 0.78 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 4 | 0.000 |
classes | 0 | 12 | 0.000 |
control_flow | 0 | 4 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
files | 0 | 15 | 0.000 |
modules | 0 | 8 | 0.000 |
parse | 0 | 4 | 0.000 |
containers | 12 | 36 | 0.325 |
tuple_return_value | 4 | 8 | 0.499 |
escape | 4 | 8 | 0.502 |
cgi | 8 | 12 | 0.663 |
varargs | 52 | 54 | 0.963 |
scoped_resource | 8 | 8 | 0.989 |
cartesian | 8 | 4 | 2.085 |
length | 12 | 4 | 3.058 |
loops | 0 | 0 | NA |