Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
classes | 0 | 27 | 0.000 |
containers | 0 | 95 | 0.000 |
fib_recursive | 7 | 880 | 0.008 |
fib_iter | 8 | 893 | 0.009 |
modules | 2 | 181 | 0.010 |
loops | 4 | 294 | 0.013 |
asdl_generated | 11 | 374 | 0.029 |
parse | 30 | 781 | 0.038 |
scoped_resource | 43 | 1,024 | 0.042 |
tuple_return_value | 16 | 226 | 0.071 |
files | 8 | 68 | 0.111 |
length | 44 | 205 | 0.214 |
cartesian | 82 | 332 | 0.245 |
escape | 96 | 347 | 0.278 |
cgi | 257 | 506 | 0.508 |
varargs | 20 | 16 | 1.256 |
control_flow | 206 | 107 | 1.932 |
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 |
cgi | 3.5 | 7.1 | 0.50 |
parse | 3.8 | 7.5 | 0.51 |
cartesian | 3.5 | 6.9 | 0.51 |
fib_iter | 3.5 | 6.9 | 0.51 |
scoped_resource | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
fib_recursive | 3.7 | 6.9 | 0.53 |
tuple_return_value | 3.7 | 6.9 | 0.53 |
length | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.9 | 0.55 |
loops | 3.9 | 7.1 | 0.56 |
files | 3.8 | 6.8 | 0.56 |
control_flow | 3.9 | 6.9 | 0.57 |
containers | 28.6 | 47.7 | 0.60 |
varargs | 5.6 | 6.9 | 0.81 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 8 | 0.000 |
control_flow | 0 | 8 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
files | 0 | 8 | 0.000 |
length | 0 | 4 | 0.000 |
loops | 0 | 4 | 0.000 |
modules | 0 | 12 | 0.000 |
parse | 0 | 4 | 0.000 |
containers | 15 | 40 | 0.387 |
cgi | 4 | 8 | 0.504 |
classes | 3 | 4 | 0.831 |
varargs | 48 | 55 | 0.861 |
fib_recursive | 4 | 4 | 0.896 |
cartesian | 8 | 8 | 0.970 |
scoped_resource | 4 | 4 | 0.979 |
escape | 12 | 12 | 1.009 |
tuple_return_value | 4 | 0 | inf |