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 |
fib_recursive | gen | 7 | 887 | 0.008 |
fib_iter | gen | 8 | 893 | 0.009 |
modules | gen | 2 | 177 | 0.010 |
loops | gen | 4 | 289 | 0.013 |
asdl_generated | gen | 11 | 373 | 0.029 |
parse | gen | 29 | 774 | 0.037 |
scoped_resource | gen | 43 | 1,020 | 0.042 |
containers | gen | 8 | 111 | 0.070 |
tuple_return_value | gen | 20 | 187 | 0.107 |
files | gen | 8 | 67 | 0.112 |
classes | gen | 3 | 19 | 0.168 |
length | gen | 44 | 207 | 0.214 |
cartesian | gen | 92 | 325 | 0.285 |
escape | gen | 102 | 345 | 0.297 |
gc_stack_roots | gen | 2 | 4 | 0.433 |
cgi | gen | 266 | 517 | 0.514 |
control_flow | gen | 202 | 109 | 1.854 |
varargs | gen | 25 | 12 | 2.050 |
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.5 | 10.9 | 0.41 |
parse | gen | 3.8 | 7.6 | 0.50 |
gc_stack_roots | gen | 3.5 | 6.9 | 0.51 |
cartesian | gen | 3.7 | 7.1 | 0.52 |
scoped_resource | gen | 3.7 | 7.1 | 0.52 |
cgi | gen | 3.5 | 6.8 | 0.52 |
length | gen | 3.7 | 6.9 | 0.53 |
files | gen | 3.8 | 7.1 | 0.54 |
loops | gen | 3.8 | 7.1 | 0.54 |
asdl_generated | gen | 3.7 | 6.8 | 0.54 |
escape | gen | 3.7 | 6.8 | 0.54 |
fib_recursive | gen | 3.8 | 6.9 | 0.55 |
modules | gen | 3.8 | 6.9 | 0.55 |
tuple_return_value | gen | 3.8 | 6.9 | 0.55 |
control_flow | gen | 3.9 | 6.9 | 0.57 |
fib_iter | gen | 3.8 | 6.7 | 0.57 |
containers | gen | 28.3 | 47.8 | 0.59 |
varargs | gen | 5.6 | 7.1 | 0.80 |
Lower ratios are better.
example name | gen | C++ | Python | C++ : Python |
asdl_generated | gen | 0 | 4 | 0.000 |
cartesian | gen | 0 | 4 | 0.000 |
classes | gen | 0 | 12 | 0.000 |
fib_iter | gen | 0 | 4 | 0.000 |
files | gen | 0 | 8 | 0.000 |
gc_stack_roots | gen | 0 | 8 | 0.000 |
length | gen | 0 | 4 | 0.000 |
loops | gen | 0 | 12 | 0.000 |
modules | gen | 0 | 8 | 0.000 |
parse | gen | 0 | 8 | 0.000 |
tuple_return_value | gen | 0 | 8 | 0.000 |
scoped_resource | gen | 4 | 16 | 0.245 |
containers | gen | 8 | 24 | 0.328 |
fib_recursive | gen | 4 | 8 | 0.448 |
escape | gen | 4 | 8 | 0.497 |
varargs | gen | 41 | 60 | 0.683 |
cgi | gen | 4 | 4 | 0.990 |
control_flow | gen | 8 | 8 | 1.018 |