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 | 2 | 310 | 0.008 |
fib_recursive | 7 | 901 | 0.008 |
fib_iter | 9 | 888 | 0.010 |
modules | 2 | 179 | 0.010 |
asdl_generated | 8 | 390 | 0.021 |
parse | 27 | 779 | 0.034 |
scoped_resource | 48 | 1,039 | 0.047 |
containers | 8 | 106 | 0.074 |
files | 8 | 69 | 0.118 |
classes | 4 | 28 | 0.128 |
tuple_return_value | 25 | 189 | 0.130 |
length | 39 | 207 | 0.190 |
cartesian | 88 | 335 | 0.264 |
escape | 110 | 348 | 0.317 |
cgi | 274 | 515 | 0.533 |
varargs | 12 | 20 | 0.595 |
control_flow | 213 | 110 | 1.945 |
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.6 | 0.41 |
parse | 3.8 | 7.6 | 0.50 |
cgi | 3.5 | 6.9 | 0.51 |
cartesian | 3.7 | 7.1 | 0.52 |
fib_iter | 3.7 | 7.1 | 0.52 |
scoped_resource | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
loops | 3.8 | 7.1 | 0.54 |
modules | 3.8 | 7.1 | 0.54 |
tuple_return_value | 3.8 | 7.1 | 0.54 |
escape | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
length | 3.8 | 6.9 | 0.55 |
control_flow | 3.9 | 6.9 | 0.57 |
containers | 28.5 | 47.7 | 0.60 |
varargs | 5.5 | 7.1 | 0.78 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
cgi | 0 | 12 | 0.000 |
classes | 0 | 8 | 0.000 |
control_flow | 0 | 4 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
files | 0 | 8 | 0.000 |
modules | 0 | 4 | 0.000 |
scoped_resource | 0 | 8 | 0.000 |
tuple_return_value | 0 | 8 | 0.000 |
containers | 8 | 35 | 0.222 |
length | 8 | 12 | 0.658 |
fib_recursive | 4 | 4 | 0.901 |
parse | 4 | 4 | 0.951 |
asdl_generated | 4 | 4 | 0.997 |
cartesian | 8 | 8 | 1.008 |
escape | 4 | 4 | 1.020 |
varargs | 56 | 53 | 1.069 |
loops | 2 | 0 | inf |