Change relative rank to simple implementation

No functional change.
More readable.
On my computer, it's not slower:
![benchtest](https://cloud.githubusercontent.com/assets/4255891/3516822/11f82f4e-06e6-11e4-890c-d9b81e5bffd0.png)