Prime Sieve Benchmark

About a week ago Dave Plummer, former MS Dev, posted a video in which we compared C#, C++, and Python by writing the same algorithm in all three languages to count the number of prime numbers between 2 and given target, as many times as possible in a given time. Video at the bottom of this post.

In the video description he linked to his code on GitHub, so I converted the C# code to LUA and popped it here -

If you want to compare Roblox Lua to any of the languages mentioned above, you’ll have to run Dave’s code. However, you can compare -

  • Server to LocalScript
  • Your phone to your PC (my phone’s actually faster! I mean, my PC’s actually slower!!)
  • Your PC to your mate’s PC
  • The server over the course of a week or longer
  • Your server score to that of someone elsewhere on the planet

I’m not going to have a terribly impressive score, but if you think your machine might then post your results here (default setting please - primes up to 1000 for a duration of 2 seconds)

Here’s the original video -

2 Likes