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

RE: shaving microseconds (avoiding N * logN behavior)



PureBytes Links

Trading Reference Links

AND definitely take this to the DLL world......accuracy and speed will be
improved greatly.

> -----Original Message-----
> From: Andy [mailto:ronin@xxxxxxxxxxx]
> Sent: Wednesday, March 29, 2000 12:03 AM
> To: omega-list@xxxxxxxxxx; Mark Johnson
> Subject: Re: shaving microseconds (avoiding N * logN behavior)
>
>
>
> : I've got a system that does an EXPENSIVE calculation
> : and right now I'm using an algorithm with O(N * logN)
> : asymptotic behavior.  I hope somebody can offer a
> : suggestion on how to reduce this to O(N), or better
> : yet, O(logN).
> :
> : Problem: for each day in the dataset, look back at
> :          the N most recent trading days and return the
> :          K'th largest Open price among those N bars.
>
>
> How about a simple binary search with 3 way comparision? That's O(log N).
>
>