[Python-Dev] Accepting PEP 3154 for 3.4?
tim.peters at gmail.com
Mon Nov 18 23:54:33 CET 2013
> Well, sending oceans of tiny integers will also incur many system calls
> and additional synchronization costs, since sending data on a
> multiprocessing Queue has to acquire a semaphore. So it generally
> sounds like a bad idea, IMHO.
> That said, I agree with:
>> Since pickle intends to be "the" Python serialization format, it
>> really should try to be friendly for all plausible uses.
> I simply don't think adding a fixed 8-byte overhead is actually
> annoying. It's less than the PyObject overhead in 64-bit mode...
A long-running process can legitimately put billions of items on work
queues, far more than could ever fit in RAM simultaneously. Comparing
this to PyObject overhead makes no sense to me. Neither does the line
of argument "there are several kinds of overheads, so making this
overhead worse too doesn't matter".
When possible, we should strive not to add overheads that don't repay
their costs. For small pickles, an 8-byte size field doesn't appear
to buy anything. But I appreciate that it costs implementation effort
to avoid producing it in these cases.
More information about the Python-Dev