For 2.0 Alpha 1.11, I re-wrote the number formatting function with the help of different people and posts around the internet. Here it is, for any of you who are also making a game with Godot: github.com/Drillur/Value-to-String-Format
The last function I used had many loops and was taking up to .25ms for a single frame. Now, with better code, it never goes above 0.04ms, which is 6x faster.
I was hoping it would make a noticeable difference on the HTML version, but I suppose it will just always run a little slow.
Btw, on desktop, my game is smooth as frick at 60 fps, it's dope.