Re: binary search with reference to append

new topic     » goto parent     » topic index » view thread      » older message » newer message
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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu