Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | gen | C++ | Python | C++ : Python |
loops | gen | 0 | 289 | 0.000 |
fib_iter | gen | 8 | 1,052 | 0.007 |
modules | gen | 2 | 181 | 0.010 |
fib_recursive | gen | 11 | 912 | 0.012 |
asdl_generated | gen | 11 | 370 | 0.029 |
parse | gen | 25 | 767 | 0.032 |
scoped_resource | gen | 46 | 993 | 0.047 |
tuple_return_value | gen | 12 | 184 | 0.063 |
containers | gen | 7 | 107 | 0.069 |
files | gen | 7 | 67 | 0.110 |
classes | gen | 3 | 22 | 0.148 |
gc_stack_roots | gen | 2 | 8 | 0.219 |
length | gen | 45 | 202 | 0.221 |
cartesian | gen | 81 | 307 | 0.265 |
escape | gen | 98 | 346 | 0.285 |
cgi | gen | 264 | 520 | 0.509 |
varargs | gen | 19 | 24 | 0.790 |
control_flow | gen | 203 | 112 | 1.810 |
Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).
example name | gen | C++ | Python | C++ : Python |
classes | gen | 4.3 | 10.8 | 0.40 |
gc_stack_roots | gen | 3.4 | 6.9 | 0.49 |
parse | gen | 3.8 | 7.6 | 0.50 |
escape | gen | 3.5 | 6.9 | 0.51 |
fib_iter | gen | 3.5 | 6.9 | 0.51 |
asdl_generated | gen | 3.7 | 6.9 | 0.53 |
cartesian | gen | 3.7 | 6.9 | 0.53 |
length | gen | 3.7 | 6.9 | 0.53 |
modules | gen | 3.7 | 6.9 | 0.53 |
scoped_resource | gen | 3.7 | 6.9 | 0.53 |
cgi | gen | 3.8 | 7.1 | 0.54 |
loops | gen | 3.8 | 7.1 | 0.54 |
fib_recursive | gen | 3.8 | 6.9 | 0.55 |
files | gen | 3.8 | 6.9 | 0.55 |
control_flow | gen | 3.9 | 7.1 | 0.56 |
tuple_return_value | gen | 3.9 | 6.9 | 0.57 |
containers | gen | 28.5 | 47.8 | 0.59 |
varargs | gen | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
example name | gen | C++ | Python | C++ : Python |
asdl_generated | gen | 0 | 4 | 0.000 |
classes | gen | 0 | 9 | 0.000 |
files | gen | 0 | 8 | 0.000 |
gc_stack_roots | gen | 0 | 4 | 0.000 |
length | gen | 0 | 8 | 0.000 |
scoped_resource | gen | 0 | 12 | 0.000 |
parse | gen | 4 | 12 | 0.345 |
containers | gen | 7 | 20 | 0.374 |
loops | gen | 4 | 8 | 0.481 |
escape | gen | 8 | 12 | 0.660 |
cartesian | gen | 8 | 12 | 0.680 |
varargs | gen | 45 | 48 | 0.948 |
tuple_return_value | gen | 8 | 8 | 0.972 |
cgi | gen | 4 | 4 | 1.002 |
control_flow | gen | 0 | 0 | NA |
fib_iter | gen | 0 | 0 | NA |
fib_recursive | gen | 0 | 0 | NA |
modules | gen | 0 | 0 | NA |