!ArmSort

v4.08 17 Jun 2012)



ArmSort is a module which provides BASIC programmers with very easy and fast facilities for sorting arrays on an Acorn RISC machine.

ArmSort caters automatically for ANY number of ANY type of single or multiple dimension BASIC array, in ANY combination of Integer, String, Indirect String or Floating Point arrays, in ANY key sequence. It also has flexible parameters and comprehensive error checking. ArmSort is VERY fast (see below), using the Flash and Shell Sort techniques in ARM Machine Code, and it is therefore very capable of complex sorts on the large data volumes that the Archimedes and RISC PC are able to hold and process.

The !ArmSort application is a Program Generation facility which enables BASIC programs to be easily created and run to sort a variety of files using the ArmSort module. They are deliberately single-tasking, to keep them simple. The generated programs can be run and edited from within !ArmSort, or can be used as a basis for other manually written programs.



Changes with v4.08

Changes with v4.01


New Facilities of v4


Facilities of v3.20





Simple Use of ArmSort


To sort an array in a BASIC program, the program must define the array, put some data into it, then just include a line in the program with the command

        *Sort Arrayname() 

and when the program is run the array should be sorted into sequence!

If the program lists the contents of the array before and after the *Sort you will see the effects of the sort.

It really is that easy!

However, there are many more sophisticated options which are described in the !Help documentation, but which are hopefully just as easy to use.



Performance


Approximate times in seconds for sample sorts using ArmSort are as follows:

Machine         Elements  Integer  String  Float  Multiple
                 
RPC 203Mhz SA    10,000     0.0      0.5     0.1      2.1
                100,000     0.5      1.7     0.8     28.5
              1,000,000     6.5     24.1    10.3     ----

Iyonix           10,000     0.0      0.3     0.0      0.9
                100,000     0.2      0.8     0.3     13.0
              1,000,000     2.8     10.6     4.5     23.3

BeagleBoard   1,000,000     1.8      7.3     2.6     15.0

Note that these times were with randomly generated values, with 10% of them set to the same value. The strings were varying 1-10 alpha characters, with 10% null.
Actual times will vary obviously with the machine model, but also depending on the actual values sorted, their initial sequence, and possibly the screen MODE.

The sorts were single arrays, except Multiple which was 3 (Integer, String, and a Real).
Indirect Strings are very similar times to normal Strings.
With BASIC VI, the Floating Point times are roughly the same.



How to obtain ArmSort


To download complete v4.08 please click on !ArmSort (67 kByte Zip Archive)




Please click home to return to the Avisoft home page.

E&OE. © Copyright Martin Avison, 2012. Last updated: Mon 18th June 2012
Please send any queries or comments to
This site is hosted by Force9 on Plusnet

Valid HTML 4.01 Transitional