@tenderlove I’m not going to be able to watch this, but I am interested in the results. Every idea I have would optimize specific cases, like knowing there is only one element and that one element is being packed with a constant pack expression that allows us to avoid looping and parsing and we can just dump the memory in the desired format. Then the optimizations on that that leverage RArray optimizations.
Aaron Patterson ✅
@ZiggyTheHamster we're just going to eliminate the Array allocation. Long term it would be cool if YJIT could generate machine code for the cases you're mentioning (I'll probably try working on that in the future, but not this Friday 😆)