Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
modules | 0 | 179 | 0.000 |
fib_iter | 4 | 895 | 0.004 |
loops | 4 | 299 | 0.012 |
fib_recursive | 11 | 886 | 0.012 |
asdl_generated | 11 | 373 | 0.030 |
parse | 29 | 759 | 0.039 |
scoped_resource | 44 | 1,056 | 0.041 |
containers | 8 | 112 | 0.072 |
files | 8 | 72 | 0.107 |
tuple_return_value | 20 | 182 | 0.111 |
classes | 3 | 24 | 0.132 |
length | 45 | 207 | 0.217 |
cartesian | 87 | 327 | 0.265 |
escape | 108 | 346 | 0.311 |
cgi | 248 | 512 | 0.484 |
varargs | 25 | 20 | 1.233 |
control_flow | 211 | 109 | 1.928 |
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.7 | 0.41 |
escape | 3.5 | 7.1 | 0.50 |
parse | 3.8 | 7.6 | 0.50 |
cartesian | 3.5 | 6.9 | 0.51 |
asdl_generated | 3.4 | 6.7 | 0.51 |
cgi | 3.7 | 7.1 | 0.52 |
tuple_return_value | 3.7 | 7.1 | 0.52 |
modules | 3.7 | 6.9 | 0.53 |
loops | 3.8 | 7.1 | 0.54 |
scoped_resource | 3.8 | 7.1 | 0.54 |
control_flow | 3.8 | 6.9 | 0.55 |
fib_iter | 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 |
containers | 28.5 | 47.8 | 0.60 |
varargs | 5.4 | 6.9 | 0.77 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 16 | 0.000 |
classes | 0 | 8 | 0.000 |
control_flow | 0 | 4 | 0.000 |
escape | 0 | 8 | 0.000 |
fib_recursive | 0 | 12 | 0.000 |
files | 0 | 4 | 0.000 |
length | 0 | 4 | 0.000 |
loops | 0 | 4 | 0.000 |
parse | 0 | 8 | 0.000 |
tuple_return_value | 0 | 12 | 0.000 |
cartesian | 4 | 12 | 0.329 |
containers | 8 | 24 | 0.335 |
modules | 2 | 4 | 0.460 |
fib_iter | 4 | 8 | 0.488 |
varargs | 41 | 52 | 0.790 |
scoped_resource | 4 | 4 | 0.990 |
cgi | 4 | 4 | 1.000 |