Re: binary search with reference to append
- Posted by jimcbrown (admin) Jun 14, 2014
- 1846 views
DerekParnell said...
petelomax said...
I'd never seen this before. Can someone please enlighten me.
That's not how I remember first writing the primes routine. I thought that if the next prime was a small one, a sequential search of the first 'X' would be faster than doing a binary search of a large table. I don't know why a ranged binary search is there.
I attempted to trace the history of primes.e back, to find the culprit who changed this from the sequential search to a ranged search.
But, this is the earliest version I can find: http://scm.openeuphoria.org/hg/euphoria/file/d0ab9cc672b8/include/primes.e