The routine is written in Assembly for TI Basic and XB, but the reason it is slow is that both move it into VDP RAM.
XB has it in upper 24K RAM but moves it into VDP....stupid thinking TI.
TI Basic does everything from VDP and makes it worse by making copies in VDP compounding the speed issues.
Speed wise the issue is using VDP that that TI Basic or XB is slow, you are attacking the wrong issue here.
All I wanted to confirm was your insight that XB variable lookup for long names was faster. And it is.
(48% slower vs only 25% slower in XB)
The rest of my comments were just a surprise that the entire program runs slower in XB.
You are the expert on those reasons too beyond a doubt.
I don't have enough life span left to understand all that stuff.