Indexing or sorting ordered arrays.
Ed Kleban
Ed at Kleban.com
Sun Nov 20 01:55:40 CST 2005
On 11/20/05 1:39 AM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:
> On 11/20/05 9:31 AM, "Ed Kleban" <Ed at Kleban.com> wrote:
>
>> When you set the fIndexed EVFlag, then V2 builds an index, correct?
>
>>
>> 5) I'm totally clueless because you're simply not indexing or sorting in any
>> of these ways.
>
> Actually nature of DBMS indexing is sort of inserts.
Doh! Of course. It's incremental to deal with a single record add at a
time. Makes perfect sense for adding individual records. So then
re-indexing an already or mostly sorted array would be very fast. Yep, yep.
But that also suggests that if I'm going to supply a very large array of
randomly ordered elements and then ebabke the "Unique" or "Indexed" flag,
that I might be better off presorting them first myself, since an insertion
sort in that circumstance could take much longer... that is if I happened to
have a plugin or RB-written sort routine that could compete with the speed
of your C++ compiled insertion sort. True?
Doesn't much matter. Most of the arrays I'm concerned with right now all
happen to be pre-sorted.
Thanks!
> For some cases of small sets we use just quicksort, but not recursive
More information about the Valentina
mailing list