Lets say I need to preform the following computationally intensive task
For i in range(100000000):
doComplexCalculationWithNoSideEffects(i)
Most people I talk to tell me that basically any modern environment (from Java on Windows to Swift on OSX) is going to automatically handle splitting this task up between any parallelizable resources on my machine. So if I happen to have 16 cores, the work would be automatically split between them.
My question is 1) is this true, and 2) if so, what does this? The operating system scheduler? The compiler? I don't like magic in programming, and at my level of understanding, that's exactly what this seems to be.
Oh and if my knowledge is completely remedial, please point me towards where it looks like I should begin learning. Thanks!
Aucun commentaire:
Enregistrer un commentaire