News for hackers. Stuff that matters.
Re:Primg – Generate prime numbers whose binary representatio... by schoen on Monday January 29, 2018 @10:00PM (#16262573)
That makes me think that their probable prime implementation isn't that great or else that they're losing a ton of efficiency to the Javascript interpreter.

  $ time python -c 'import gmpy; gmpy.next_prime(2**2500)'
  
  real	0m0.443s
Was it taking a lot longer than that for you?

Edit: I can see that there is an element of luck in terms of how many candidates you have to look at, but I'm still seeing everything in this size range take under 2 seconds. Maybe it's a question of what probability of error you're accepting from the test?

Re:Primg – Generate prime numbers whose binary representatio... by johndough on Tuesday January 30, 2018 @03:27AM (#16263761)
GMP is very well optimized and implemented in assembly. There's no way that a JavaScript implementation can get anywhere close to that performance since JavaScript doesn't even have support for 64 bit integers. WebAssembly might be faster, but is still lacking many instructions commonly used for big integer arithmetic.