qbittorrent/qBittorrent — pull request #2041 by sorokin (2014-10-17 21:38:58+00:00)
Title: Optimize misc::naturalSort()

Previous implementation used QRegExp to find a first digit. That is
utterly ineffective.

When torrent list is sorted by name (a column that uses the naturalSort() for
comparison), naturalSort could take 18.6% of the time of the UI thread. Optimize it
so now it takes 1% of the time of the UI thread.

This is how old naturalSort() looks like:
![natural-sort-old](https://cloud.githubusercontent.com/assets/286877/4686437/c5e3755a-5645-11e4-8515-f88fbc6711da.png)
![natural-sort-old-code](https://cloud.githubusercontent.com/assets/286877/4686439/cf1719ec-5645-11e4-926f-a002afd25188.png)

This is how new naturalSort looks like:
![natural-sort-new](https://cloud.githubusercontent.com/assets/286877/4686440/d65add24-5645-11e4-83a9-38772dc0ac19.png)