5 ms·
Truffle team lead here. Yes we are working full steam on improving warmup and delays caused by going back to the interpreter in unexpected cases. Expect bigger
by grashalm 6y ago
Truffle team lead here. Yes we are working full steam on improving warmup and delays caused by going back to the interpreter in unexpected cases. Expect bigger improvements in this area soon.
That being said, we cannot do it all on the Truffle side without help of the language implementation. Truffle languages speculate on certain aspects of the program data. If they do so, then we need to deoptimize and invalidate the optimized code when this speculation is violated. So the stability of the language implementation really is an important factor. Questions like "do we need to speculate on this value being constant or does give us enough benefit to justify the deoptimization overhead?" need to be answered by the language implementation and not the Truffle framework. Afaik this was not a priority for TruffleSqueak so far, but it might be in the future. So there are potentialy future improvements also on the TruffleSqueak side.
- kjeetgill 6y agoI had no idea speculation was surfaced up through Truffle. That's so cool.
- grashalm 6y agoWell, it is necessary to expose this to language implementations to reach good performance. If we could reach the same performance otherwise, we would not expose it, as it makes implementing Truffle languages more complicated. Unfortunately automating the specializing part is an unsolved research question for a method based compiler (deserves its own PhD). Other trace based meta-compilation approaches (e.g. PyPy) have an advantage here, but disadvantages in other areas.