[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: CL_Quicker Sorting



PureBytes Links

Trading Reference Links

There is a fast C DLL for doing sorting called
QLSNUMS 


It allows you to create multiple lists of data and then
sort them in various ways maintaing the order between
multiple lists..It then allows you to do a lot of fast
simple stats on the data, like mean, mode, kurtosis
varianve etc....

It has operations for lists, queues and stacks...

Have a look at web page

www.ozemail.com.au/~qtrade




-----Original Message-----
From:	Cab Vinton [SMTP:cvinton@xxxxxxxxxxx]
Sent:	Sunday, 31 January 1999 1:21
To:	L_Code-List
Subject:	CL_Quicker Sorting

It occurred to me that there might be a way to speed up typical sorting
routines used by most traders.

At present my code gathers all my data into an array & then sorts the
entire bunch on each bar. This seems pretty inefficient given that
following the initial sort, the array is already 99% sorted.

So instead, why not fill and sort just once, then on following bars
search for the appropriate insertion point, shift the appropriate values
down one and insert the new value?

Is this making any sense? Would the savings in code efficiency be
worthwhile?

Cheers,

Cab Vinton
cvinton@xxxxxxxxxxx