[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sort on vectors slow
From: |
Marius Vollmer |
Subject: |
Re: Sort on vectors slow |
Date: |
Wed, 20 Oct 2004 00:28:09 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Marius Vollmer <address@hidden> writes:
> Now, time to get out the Knuth...
Wasn't needed after all... it turned out that our quicksort was always
using base_ptr[mid] as the pivot and did not take into account that
the "collaps the walls" loop might overwrite that location, thus
incorrectly changing the pivot during collapsing. I have fixed this
by copying out the pivot into a local variable. 'sort' and 'sort!'
should now work reasonably also for large vectors.
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405