Let's consider a hypothetical algorithm that has a complexity described by . Assume that there is an inner loop that involves 1,000 bytes of Python code. When processing 10,000 objects, we're executing 100 billion Python operations. We can call this the essential processing budget. We can try to allocate as many processes and threads as we feel might be helpful, but the processing budget can't change.
An individual CPython bytecode doesn't have simple execution timing. However, a long-term average on a macOS X laptop shows that we can expect about 60 MB of code to be executed per second. This means that our 100 billion ...