Use Array#sort_by instead of Array#sort
This change improves update performance
Before: 16min
After: 12min
OS: Ubuntu 13.04 x86
CPU: Intel Core i5 M450 2.4GHz
Memory: 2GB
Ruby: 1.9.3p448
Merge pull request #3 from ridec/improve-update-performance

Update performance improvements

Pull requested by @ridec. Thanks!!!