Disinformation Purveyor :verified_think: (thatguyoverthere@shitposter.club)'s status on Sunday, 26-Mar-2023 21:32:16 JST
-
@kkarhan so I found that I wasn't skipping even numbers in my perl version which hurt performance. I also wrote a python and c version because I think the differences in the languages are interesting.
On my laptop 10k primes in C, JavaScript, Perl, and Python take:
C: ~0.75 seconds
JavaScript: ~1.15 seconds
Perl: ~16 seconds
Python: > 20 seconds
I didn't bother doing 100k with python or perl, but with C 100k is complete in about 90 seconds and javascript takes about another minute.