mawerty / Is-Prime

O(1) Algorithm to check if number is prime that works in 95%+ cases.
https://mawerty.github.io/Is-Prime/
Other
707 stars 144 forks source link

I need O(-1), please. #148

Open Giftzwerg02 opened 6 months ago

Giftzwerg02 commented 6 months ago

I am starting another hobby-project that needs to be blazingly fast (it will handle 0 Users per month, therefore I need it to be performant enough to handle those requests).

Although an O(1) algorithm for is-prime is okay(-ish), I would like to know if there are any plans to implement an O(-1) version. I checked some things and it turns out this shouldn't be too complex.

Language-wise I don't really care in which language this O(-1) is-prime algorithm is implemented as long as it is one from this list below:

If you need any help implementing this algorithm please do not contact me as I am a very busy business person.

Pushover-1 commented 6 months ago

You probably went or are going to one of the top schools! As someone who became a beta developer after presenting this repo as my thesis, the best I could ever do was O(0).

Man! Some people really do be different!

mawerty commented 6 months ago

O(-1) would be really hard, but one guy made O(0)! Check out the whitespace optimized implementation, there is no code so It doesn't make any operations! Maybe this will be fast enough for you

Giftzwerg02 commented 6 months ago

O(-1) would be really hard, but one guy made O(0)! Check out the whitespace optimized implementation, there is no code so It doesn't make any operations! Maybe this will be fast enough for you

Thank you for your (underwhelming) efforts, but my business consumers want their computation-result yesterday, therefore O(-1) is the maximum time-complexity I can accept.

Please try harder, yours faithfully A busy business person