A huge optimization could be made by storing and int array of already found primes and test all primes smaller then half the to-test number. this will speed up a lot. Another huge improvement could be made with hardcoding everything up to the prime 3 and then iterate with intervals of 2 instead of 1.
- ProjectEuler problem 35 Tiberiu Gal
- Re: ProjectEuler problem 35 Dmitry Olshansky
- Re: ProjectEuler problem 35 Era Scarecrow
- Re: ProjectEuler problem 35 Tiberiu Gal
- Re: ProjectEuler problem 35 Era Scarecrow
- Re: ProjectEuler problem 35 Andrea Fontana
- Re: ProjectEuler problem 35 Tiberiu Gal
- Re: ProjectEuler problem 35 Stewart Gordon
- Re: ProjectEuler problem 35 maarten van damme
- Re: ProjectEuler problem 35 Stewart Gordon
- Re: ProjectEuler problem 35 Jay Norwood
- Re: ProjectEuler problem 35 Andrea Fontana
- Re: ProjectEuler problem 35 Tiberiu Gal
- Re: ProjectEuler problem 35 Andrea Fontana
- Re: ProjectEuler problem 35 Tiberiu Gal
- Re: ProjectEuler problem 35 Andrea Fontana
- Re: ProjectEuler problem 35 Tiberiu Gal
- Re: ProjectEuler problem 35 Ali Çehreli
- Re: ProjectEuler problem 35 Jay Norwood