Revision 183e59b...
Go back to digest for 26th May 2013Optimization in KDE Base
Frank Reininghaus committed changes in [kdelibs] kdecore/util/krandomsequence.h:
Use the Fisher-Yates algorithm to randomize lists
This ensures that the time required for the shuffling depends linearly
on the length of the list, rather than quadratically. Moreover, it
prevents memory allocations during the shuffling and thus saves time
even for very short lists.
REVIEW: 110262
File Changes
Modified 1 files
- kdecore/util/krandomsequence.h
1 files changed in total