carlosascari/2xBR-Filter — pull request #2 by Lugtech (2014-12-05 18:48:34+00:00)
Title: Changed fillMatrix(x, y)

The previous fillMatrix was pretty convoluted. This one is actually faster, and much more readable (IMO).
Although it does have if (ternary) statements, it is faster because it calculates each x or y coordinate only once.
I found that this new function made the whole scaling algorithm take about 60% the time as the previous (Firefox 33.1).