Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
-vim-31256yOh fuck! I just realised, 2^64 is 1.8e19 and the number I get is 1.8e18
That can’t be good -
-vim-31256y@Electrux oh, that could explain it!
Maybe there’s an edge case with the sieve of atkin, probably if it’s the limit is like 0 or negative -
Yea. I remember those challenges. Sieves don't scale well. I've done it too. There's some optimizations you can do to make it faster but good old factorization is the way to go when dealing with such massive numbers.
-
hack64156y@Wisecrack maybe they have wrongly configured scaleable architecture that extends automatically? If thats the case someone gonna get bankrupt this month.
> be me
> has some free time
> decides to practice rust skills
> logs on codewars
> finds challenge involving prime numbers
> passes 30 min skimming the Internet to implement the Sieve Of Atkin algorithm
> tries example tests
> passes
> submits answer
> “memory allocation of 18446744073709547402 bytes. failederror: process didn’t exit successfully”
> 18446744073709547402 bytes ~= 18 million petabytes
So yeah, I think it’s broken
random