Benchmarks for bindings#138
Benchmarks for bindings#138countvajhula wants to merge 340 commits intodrym-org:lets-write-a-qi-compilerfrom
Conversation
This is the same issue as we were seeing with partial application's use of the `curry` form in its implementation, which required that the arguments be available at compile time. We fixed it in the same way, by wrapping the implementation in a lambda that accepts the runtime arguments, allowing the use of bound identifiers in the feedback specification.
Correct normalizations
(restored - got dropped in the rebase)
(restored - got dropped in the rebase)
Also expand the de-expander with a few more patterns
Bind and switch (and other improvements)
|
Any other patterns that might be useful to benchmark @benknoble ? Do we feel that bindings would have any nonlocal interactions worth benchmarking, e.g. would checking I tried this with your change to boxes and here are the results before and after: set! boxes: Average over 5 runs: They're about the same. Honestly, I'm not sure our local benchmarks might be dominated by the cost of constructing lambdas and such, so that we may not actually be seeing anything specific here about bindings. |
|
When you only construct the binding, you don't do anything useful... that is, the code is basically It might also be that the compiler output is complicated enough to defeat the Chez optimizer anyway, in which case this won't matter (I never did prove that using boxes re-enables the optimizations disabled by set!). But it might still matter at the module level. I would be interested in a module that Chez can optimize noticeably, but where using Fortunately I think if we can find a small pure optimizable function, the set! just has to be elsewhere in the module to turn off optimizations? Unfortunately, I don't know of such an example. |
|
Fwiw I asked Bard which optimizations are turned off by use of
We could try coming up with an example exhibiting as many of these as possible... |
cad6c0e to
59fedaa
Compare
Summary of Changes
We don't have any benchmarks making use of bindings.
Public Domain Dedication