jdorn/sql-formatter — pull request #53 by Gobie (2013-11-26 11:50:59+00:00)
Title: Optimized speed of initializing reserved words list.

Sorting done by usort has complexity n*log(n) which means it calls with current number of reserved words ~2500x usort and ~5000 strlen.
This solution is 3x time faster with just litlle memory overhead, not mentioning it is shorter,