| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | A question |
Hi Jasen! :-) PS>> Quicksort has a worst-case of O(n^2), in the case of an already PS>> sorted array. But your right, on random data it's O(n log n) JB> Most implementations of qsort() have code to handle that case better. Hard to check for, I'd think. The glibc version has quite a lot of optimizations, though. For example, it falls back to insertion sort (I think it was that) under a certain partition size where qsort'ing the remaining partition would be slower (machine-dependend threshold, even). Ciao Pascal --- Msged/LNX 6.1.1* Origin: Priority override. Tears of Ra. (1:153/401.2) SEEN-BY: 633/267 270 @PATH: 153/401 307 140/1 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.