Skip to Content
Secret Recipes of the Python Ninja
book

Secret Recipes of the Python Ninja

by Cody Jackson
May 2018
Intermediate to advanced content levelIntermediate to advanced
380 pages
9h 37m
English
Packt Publishing
Content preview from Secret Recipes of the Python Ninja

There's more...

One thing to note about multiprocessing.pool(): if you don't provide an integer argument to specify the number of workers in the pool, the program will default to all the CPUs available in your system. If you have a dual-core system, you'll get two workers. Have a monster of a system with 48 cores, then you get 48 workers.

When it comes to cores, if you have Intel CPUs with hyper-threading, each individual CPU counts as two when it comes to multiprocessing. So, if you plan on writing a lot of parallelized software, it may be better to spend the extra money and maximize the number of hyper-threaded CPUs you can get.

The map() function is a function that applies another function over a sequence, typically a list. It takes a ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The Expanding World of Python

The Expanding World of Python

Dane Hillard

Publisher Resources

ISBN: 9781788294874Supplemental Content