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 | 23 | 0.000 |
fib_iter | 8 | 886 | 0.009 |
modules | 2 | 175 | 0.010 |
fib_recursive | 11 | 886 | 0.012 |
loops | 4 | 287 | 0.013 |
asdl_generated | 11 | 387 | 0.030 |
parse | 30 | 754 | 0.040 |
scoped_resource | 47 | 1,025 | 0.046 |
files | 4 | 72 | 0.053 |
containers | 8 | 107 | 0.072 |
tuple_return_value | 20 | 192 | 0.105 |
length | 45 | 202 | 0.222 |
cartesian | 80 | 324 | 0.248 |
escape | 107 | 349 | 0.305 |
cgi | 268 | 513 | 0.523 |
varargs | 27 | 20 | 1.361 |
control_flow | 201 | 111 | 1.818 |
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.8 | 0.41 |
loops | 3.5 | 7.1 | 0.50 |
parse | 3.8 | 7.6 | 0.50 |
length | 3.5 | 6.9 | 0.51 |
scoped_resource | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cartesian | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
fib_iter | 3.7 | 6.9 | 0.53 |
fib_recursive | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.9 | 6.9 | 0.57 |
control_flow | 3.9 | 6.8 | 0.58 |
containers | 28.5 | 47.8 | 0.59 |
varargs | 5.5 | 7.1 | 0.78 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 16 | 0.000 |
escape | 0 | 4 | 0.000 |
fib_iter | 0 | 12 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
length | 0 | 12 | 0.000 |
loops | 0 | 8 | 0.000 |
modules | 0 | 8 | 0.000 |
parse | 0 | 16 | 0.000 |
scoped_resource | 0 | 8 | 0.000 |
containers | 8 | 28 | 0.276 |
classes | 3 | 8 | 0.422 |
varargs | 39 | 52 | 0.748 |
files | 4 | 4 | 0.951 |
cartesian | 12 | 12 | 1.004 |
control_flow | 8 | 4 | 2.036 |
cgi | 0 | 0 | NA |
tuple_return_value | 0 | 0 | NA |