[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How fast is LuaJIT supposed to be?
- From: Javier Guerra Giraldez <javier@...>
- Date: Fri, 21 Jan 2011 13:29:31 -0500
On Fri, Jan 21, 2011 at 12:59 PM, Joseph Manning <email@example.com> wrote:
> I simply meant to convey that the overall Sieve of Eratosthenes program
> will be faster if the above loop starts at k*k rather than at k*2 ,
> since it will have fewer iterations to go through.
ah, right. it was an algorithmic optimization rather than a mechanical one.
i didn't bother to analyze the code; but i certainly found weird to
see 'k*2', since most prime-related algorithms have 'k^2'. (or sqr(x))