News for hackers. Stuff that matters.
Re:Code Llama, an AI tool for coding by bakuninsbart on Friday August 25, 2023 @09:50AM (#37261719)
Exactly, multiples of 2 can't be a prime, so skipping this saves a function call (that itself only does one comparison), so it is a very simple and relatively obvious optimization. But actually every multiple of a number per definition cannot be a prime, you can't just change the step size, but there are some nifty tricks to approach the problem from a different angle.

There are no comments on this comment yet.