On Apr 28, 2014, at 11:52 AM, Florian Weimer <fwei...@redhat.com> wrote:
> On 04/28/2014 07:53 PM, Brian Burkhalter wrote: > >> Meanwhile I suppose that I could convert my test file and use the >> sun.misc.UU{En,De}coder classes to handle it in the test. > > Uh-oh, we have java.util.Base64 these days. D’oh. I should have known as I was working on something in the code base recently. > But in this case, it's probably simpler to use this code snippet instead of > adding 235 KiB of incompressible binary data to the source code. > > […] > > (I hope it's correct, but you get the idea…) > > Anyway, for the first 100K primes, it runs in roughly 400 ms on my machine, > including JVM startup and teardown. That should be completely negligible > compared to actually testing all the numbers for primality using a any > non-sieve algorithm. Thanks. I should have thought of that myself. I’ll re-work the thing and re-post an updated patch. Regards, Brian