rmm5t/jquery-timeago — pull request #166 by vipero07 (2014-02-13 21:58:32+00:00)
Title: Changed words var into a table lookup

Modified words var so it uses a table lookup to decrease the cost of running timeago calculations. This should result in a notable speed increase. Instead of relying on a bunch of or statements where it would average 5.5 function calls per timeago, it now should now average 2.25. Also moved calculations of minute hour day and year so it only calculates them when needed.

Here is a test showing the speed differences.
http://jsperf.com/timeago-speed-test

It also passes the current test suite.

P.S.
My apologies for the earlier pull request, I'll submit the timeout fix a little later tonight.