Ruby: tweak join order in API::Impl::edge#9159
Conversation
|
I would say a nine-digit tuple count is definitely in the realm of "stuff to worry about". The fix looks fine to me, though it bugs me a bit that the version that performs better is somewhat less readable. Perhaps you should poke the compiler team about this. |
What would be your reason for poking them? Is it that you think the compiler should have been able to choose the improved join order on the old code? |
It is my understanding that they are generally interested in performance fixes that make the code "worse" (e.g. less readable). This makes me wonder, though, if this wouldn't be better fixed with an appropriate unbinding (or refactoring using a |
|
I believe you can achieve the same effect by replacing c.getSuperclassExpr() = a.asExpr().getExpr()with pragma[only_bind_into](c).getSuperclassExpr() = a.asExpr().getExpr()which forces |
3a507d6 to
134cf4e
Compare
|
That does appear to work, thanks! |


I still feel pretty new at this, so I'm not sure if this is a valuable change (is a nine-digit tuple count worth worrying about?), or if it's the right way of doing it.
Before
After