How Code Imitates Chess
or, How Google Got It Wrong.
Recently, Google announced how you should speed up your PHP. They got it wrong, virtually on every point. And not just by a little; subsequent testing showed one of their “improvements” actually resulted in code that took twice as long to execute!
How could this happen?
Maybe being a chessplayer gives me an advantage, but it’s obvious to me. It happens all the time in chess books. A grandmaster will analyse a chess position, and declare the best move is x! (The exclamation is required, it indicates an excellent move.) X! is therefore published to the world and Everyone Knows it’s the right move.
(more…)