ArmSort

!ArmSort

v4.09 (10 Apr 2021)




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.09 (10 Apr 2021)

Changes with v4.08 (17 Jun 2012)


Summary of ArmSort Facilities





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     100,000     0.1      0.3     0.2      0.6
  xM revC     1,000,000     1.8      7.3     2.6     15.0
             10,000,000    20.6    111.3    40.5    188.0

Titanium      1,000,000     0.3      1.1     0.4      1.6
             10,000,000     4.5     2.73     6.2     26.9
             16,000,000     7.6     41.1    10.5     43.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.09 please click on !ArmSort (72 kByte Zip Archive)




Please click home to return to the Avisoft home page.

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

Valid HTML 4.01 Transitional