[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Jobs

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 25
Thread images: 1

File: primes.png (120KB, 1192x968px) Image search: [Google]
primes.png
120KB, 1192x968px
Now that I know how to sum all the primes under 2 million quickly. What job should I apply for?

Please help me.
>>
>using Windows 7
Mohammad, the world is already on Windows 10.
>>
>>60222350
maybe the US military is but not me.
>>
>>60222310
>What job should I apply for?
interviewer
>>
>>60222377
surely that's not an actual job. they pull full time programmers to do interviews whenever they need more people
>>
try caching so you don't do the same calculations over and over again
>>
>>60222310
>importing math module to take the sqrt instead of just using x**0.5
>windows
>VS
>>
>VSC + Python
Is this more disgusting than Atom?
>>
>>60222450
or just calculate by hand since it's only calculated once
>>
>>60222482
its the new, better Atom and I find it quite pleasant
>>
I think you are ready to apply here
https://careers.google.com/
>>
>>60222450
Also, forgot to add:
>using lists for truth testing instead of unsigned char array
You can't even sieve a couple billion without using multiple GiB of memory. Utter trash, I'm appalled that something so trivial can be fucked up so hard.
https://docs.python.org/3/library/array.html
>>
>>60222583
>>60222516
your feedback is absolutely appreciated.
>>
Use xrange instead of range. range allocates an array in memory, xrange is a generator with O(1) memory usage.
>>
>>60222387
Then... how about a "technical recruiter"? They always contact me on linkedin and they never seem to have any idea what the fuck they're talking about.
>>
>>60222727
>NameError: name 'xrange' is not defined
>python 2
>>
>>60222727
python 3 took xrange from python2 and named it range. So i'm already using xrange
>>
>>60222727
Not in Python 3 – they deprecated the old `range` and xrange became range.

OP, the algorithm looks fine but look into more performant Python. NumPy is a low-hanging fruit there. You can also try Cython and Numba.
>>
>>60222350
Still using win7 too... Hate Win10 interface. I might be wrong but I'll stick to my 7 a bit more until I need to play some DX12 games
>>
>>60222834
>checking even numbers
>algorithm looks fine
If you fail to spot instances of unimplemented trivial optimization, you have no place commenting on whether or not an algorithm is "fine".
>>
dont forget about me
>>
>>60222482
>>60222489
your text editor is running in a fucking web browser. stop it.
>>
>>60223657
what what's wrong with that?

it's supposed to run in a commandline and take me 40 hours to learn?? is that what u think?
>>
>>60222310
>iterating from 2 to sqrt
>log
>>
>>60222350
eat shit and die, pajeet
Thread posts: 25
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.