Download MetaTrader 5

Scripts: sSortTest

To add comments, please log in or register
Unable to find the answer to your question? Use the search!
Automated-Trading
Admin
99089
Automated-Trading 2012.06.04 10:38 

sSortTest:

Comparative study of sorting algorithms.

The script contains several sorting methods for sorting of double[] array:

    Sorting algorithms performance:

    • Hoare - 8 ms;
    • Shell - 78 ms;
    • SelectFst - 126 ms;
    • Selection - 582 ms;
    • Insertion - 702 ms;
    • Bubble - 1558 ms;

    Author: Дмитрий

    Fig. 1. Sort algorithms performance

    Fig. 1. Sort algorithms performance

    The fastest sort method is Hoar sort (Quick sort), but it's recursive and needs a careful use.

    To add comments, please log in or register