Sometimes, I want to know what's fast. Usually I google it. But, in the below cases, I decided I needed to try it myself.
- Fastest Factorial - what's the cost of doing it recursively? Turns out While is 10x faster.
- Fastest way to find type - instanceof seems good. JQuery uses constructor. Prototype.toString is probably the most safe and compatible.
- Speed of Sorts, when written as recursive or using a while loop.