If speed and compilation is a concern, let's start with having proper types in javascript. That will speed things up a whole lot faster and save a lot of battery than this.
I am not saying this won't make things faster. There are many things you can do to make things faster but this really is such a niche feature (for web based apps).