On Sunday, 4 March 2018 17:07:20 UTC-4, Jan Mercl wrote: > > On Sun, Mar 4, 2018 at 9:38 PM <ralphdo...@gmail.com <javascript:>> wrote: > > > The performance looks to be as good or slightly better than my simple > implementation. > > FTR, the performance is in an order of magnitude, or as you put it > "slightly", better in the case of uint32 - and probably several orders of > magnitude in the other cases (uint16, uint64), because of a different > algorithm used. > > > -- > > -j >
For my use case, I'll only be checking numbers > 2^18 and < 2^25. After looking at the repo, it's not simple enough to copy primes.go, anyone that wants to rely on it would have to fork the repo. Where performance is key, mathutil would be the obvious choice. For cases where faster than ProbablyPrime is good enough, my code is an easy copy/paste. To make it even easier for people to use, I just changed the licence from MIT to public domain. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.