Re: [libertybasic] Re: Faster sorting and possibly a search text box
- just as a hypothetical...
in the case below, with greater than 600 records, say 4000 or whatever,
when is it time consider getting involved in using something like the
cheetah database add-on (or tsunami, etc) for speed or otherwise?
any input appreciated - just getting started.
----- Original Message -----
From: "rod_bird001" <rodbird@...>
Sent: Thursday, August 30, 2007 4:39 PM
Subject: [libertybasic] Re: Faster sorting and possibly a search text box
> There are many examples of sorting and searching if you browse this
> forum. Sorting 600+ records should be instantaneous, check out the SORT
> command in the helpfile and use the search facility in this forum. Post
> example code and you will get specific help.
> --- In email@example.com, "sebogawa" <sebogawa@...> wrote:
>> i am working on a database and ive entered over 600 records into it
>> and it is very slow...i would like to know if anyone knows a good
>> sorting algorithm or something to make the sorting faster...maybe if
>> someone has some source code for a liberty basic shell sort algorithm
>> or anything to make a listbox full of records from a random access
>> file sort faster...
>> another thing is that i need a search box to search through the
>> database for a certain record..does anyone know a way to code that
> Yahoo! Groups Links
- Just as a hypothetical......
It depends on whether or not you want/need to take the time to learn the hypothetical data base application.
With the native function included with Liberty, you should be able to create a dummy file of 5,000 entries for name$, age$, and telephone$ in less than 500 milliseconds.
The native SORT function is capable of sorting the dummy file in 32 milliseconds.
Displaying on the monitor may take as long as 30 seconds due to the inherent lag of a physical device. Of course, sending to a line printer will take much longer.
A find routine should be able to do a sequential search of the 5,000 elements in less than 32 milliseconds to locate a particular record. If you have already sorted the data, a binary search will find a given record even faster.
Okay, you've sorted your file in .03 seconds, and found a given record in .01 seconds using LB programming alone. That's pretty darned fast. And you still need more speed?
[Non-text portions of this message have been removed]