Remove custom sort implementation in QTriangulator in favour of std::sort.
authorRobin Burchell <robin+qt@viroteck.net>
Sun, 2 Sep 2012 09:58:36 +0000 (11:58 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 4 Sep 2012 18:47:20 +0000 (20:47 +0200)
commit90e4a5b5f00f1b9402ea35754eefe25bfbc0d1d3
tree23e1ea02eaeeb3f96dc264c569896981dc8f6d3e
parente525df612cfc1b26618e5ce5226f517c2f83900b
Remove custom sort implementation in QTriangulator in favour of std::sort.

qSort has terrible performance, especially on mostly-sorted input, which is
presumably why a custom implementation was created. However, std::sort has much
better performance than qSort in many cases.

Benchmarking shows that std::sort beats out the custom sort by a very narrow
margin (21-22ms for qSort, 14-15ms for sort, 14ms for std::sort) in a simple
benchmark of sorting.

Change-Id: If7e57fdfaf98e741d1621969461537c82f9169fe
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
src/gui/opengl/qtriangulator.cpp