Faster meshing 2

Huge improvements in meshing speed. Down from ~50ms to ~8ms on my computer.

Using a lookup table rather than a function yielded a slight improvement.

The biggest improvement, however, was moving the constant definitions outside of the function where they are used. I guess the compiler wasn't smart enough to move our constant definitions outside the function (so they were getting recreated every time...).

Might still be room to shave a few ms off, I added the ability to use the chrome profiler directly, which was super helpful.