@handerixgrr4587

I've written master degree thesis on prime number sieves based on Eratosthenes sieve. Including parallel versions. Eratosthenes sieve optimizations are about Paul Pritchard prime number sieves tree, that divides those algorithms on three groups: based on grouping composite numbers based on lowest prime factor, greatest prime factor and incremental ones. It shown that gpf algorithm with wheel factorization both single-threaded and parallel version were the fastest among them.

I'm proud of that they were algorithms with my own ideas of how they should work.

@_Valentin

Sieve of Aktin next

@goswinvonbrederlow6602

If you are building a list of prime numbers than you only need to test division by those numbers. Also hardcode 2 and only test odd numbers for a tiny boost. Replace i < sqrt(n) with i * i < n for another little boost.

@ripolas

Love your content, but i've got a little suggestion: next time if you're doing a comparison of some sort, make the  times equal, because in this video you ran some for 5mins, some for 10secs

@OganySupreme

A couple years ago, I wrote a C program using the Sieve of Eratosthenes. Getting up to the number 1 billion took about 84 seconds. 

Instead of using an array of bools, I used an array of ints and used bitshifting operations so each prime number is stored as a single bit (true or false, representing prime or not). I also acted like even numbers didn't exist, so I didn't have to multiply by 2, or multiply any of the prime numbers by an even number. This cut the number of multiplications by half.

It was an interesting little experiment.

@bibekshah3701

I just use curl to the prime page and parse it. Time complexity is O(1)

@dtar380

I’ve done my self some optimisations to the sieve of Eratosthenes, first optimisation is using just odd numbers, as every even number different than 2 is not prime, and then some code optimisations for calculation.
And then I used bit array instead of list of bools so that it takes 8 times less in the memory, although it made it a bit slower to run, but still faster than original untouched sieve.
So now I have a sieve that runs around 1.5 times faster and that takes 8 times less memory to run.

@alfaa4136

another way to make this faster is by implementing it in C++ or even just C#. maybe rust?

@farukyldrm8498

division gets harder as numbers get greater. other binary operations do so, but division is worse among them

@GiiT2024

I love your content and how you explain things

@WojZdroj21

Prime is an ultrakill refference

@TheCrackerX-k3u

you could use multi-threading to make it even faster, and since we know 1 & 2 are already prime numbers, you can already put them in the list and then start from 2

@Ramim-r4q

a video on "how to break encryption using'em".

@mr.unknown6179

I don't no this algorithm but i implemented the same algorithm😂

@raunak5344

Muller Rabin primality test is used to generate 1000s of digit long primes

@mehrozmustafa9513

Maybe use C/C++ for faster code execution instead of turtle speed python

@Fabian-cy4eb

Would the Miller-Rabin-Prime-Test faster for larger numbers?

@samiparlayan4758

use numpy and you'll 10x that 😭😭😭

@pr1me_von

Impressive. Very nice.. lets see Paul Allen's sieve

@TeraxyGottwald

Loved it!!