On 19-07-11 09:31, James Geddes wrote: > Indeed, I would have thought that the calculation time would be > entirely dominated by the test for primality, and especially what > happens once the candidate primes are bigger than 2^64 and can no > longer be represented by a single word.
James, I assume that you are right. The isprime procedure in my python code is the one from sympy (I didn't bother to include the import line in my previous email). The prime? procedure in my Racket code is that from the math/number-theory library. I don't know anything about sympy, but I seem to recall that Python libraries for these sorts of things often rely on fast routines written in C. I suppose it might be interesting to implement the same prime-checking in both Python and Racket and *then* compare speeds. I'm afraid I've not really looked into Typed Racket yet, although I probably should. Regards, Bob -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/20190711134022.v4jduee4ckd3pozo%40bob-cit. For more options, visit https://groups.google.com/d/optout.