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 | 0 | 501 | 0.000 |
varargs | 0 | 10 | 0.000 |
modules | 1 | 323 | 0.003 |
fib_iter | 3 | 974 | 0.004 |
scoped_resource | 10 | 1,547 | 0.006 |
fib_recursive | 13 | 1,491 | 0.009 |
asdl_generated | 18 | 710 | 0.025 |
parse | 43 | 1,379 | 0.031 |
files | 9 | 132 | 0.068 |
containers | 10 | 131 | 0.076 |
tuple_return_value | 26 | 308 | 0.086 |
classes | 3 | 27 | 0.106 |
iterators | 1 | 8 | 0.126 |
small_str | 1 | 8 | 0.129 |
classes_gc | 2 | 14 | 0.159 |
length | 67 | 385 | 0.175 |
cgi | 241 | 1,063 | 0.227 |
arith_ops | 1 | 4 | 0.259 |
escape | 154 | 547 | 0.282 |
cartesian | 157 | 554 | 0.283 |
strings | 1 | 4 | 0.283 |
control_flow | 316 | 196 | 1.616 |
Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).
example name | C++ | Python | C++ : Python |
classes | 4.4 | 10.9 | 0.40 |
classes_gc | 4.0 | 9.4 | 0.43 |
loops | 3.5 | 7.6 | 0.46 |
strings | 3.5 | 7.5 | 0.47 |
parse | 3.8 | 8.1 | 0.47 |
arith_ops | 3.4 | 7.2 | 0.48 |
small_str | 3.5 | 7.3 | 0.48 |
iterators | 3.6 | 7.4 | 0.48 |
scoped_resource | 3.6 | 7.3 | 0.49 |
length | 3.7 | 7.4 | 0.50 |
fib_iter | 3.7 | 7.4 | 0.50 |
cgi | 3.7 | 7.3 | 0.50 |
fib_recursive | 3.7 | 7.3 | 0.51 |
varargs | 3.8 | 7.4 | 0.51 |
control_flow | 3.8 | 7.5 | 0.51 |
asdl_generated | 3.7 | 7.3 | 0.51 |
modules | 3.8 | 7.4 | 0.51 |
escape | 3.7 | 7.2 | 0.51 |
cartesian | 3.7 | 7.3 | 0.51 |
tuple_return_value | 3.7 | 7.2 | 0.52 |
files | 3.8 | 7.2 | 0.53 |
containers | 28.5 | 47.7 | 0.60 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
arith_ops | 0 | 4 | 0.000 |
asdl_generated | 0 | 4 | 0.000 |
cgi | 0 | 4 | 0.000 |
classes | 0 | 8 | 0.000 |
control_flow | 0 | 4 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
length | 0 | 4 | 0.000 |
parse | 0 | 4 | 0.000 |
scoped_resource | 0 | 8 | 0.000 |
strings | 0 | 4 | 0.000 |
containers | 5 | 24 | 0.208 |
fib_iter | 3 | 4 | 0.851 |
loops | 4 | 0 | inf |
varargs | 4 | 0 | inf |
cartesian | 0 | 0 | NA |
classes_gc | 0 | 0 | NA |
escape | 0 | 0 | NA |
files | 0 | 0 | NA |
iterators | 0 | 0 | NA |
modules | 0 | 0 | NA |
small_str | 0 | 0 | NA |
tuple_return_value | 0 | 0 | NA |