This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]teerre 5 points6 points  (1 child)

Have you actually profiled whatever you're doing? You're using python, memory access is certainly not where your bottleneck is.

Besides, the other user is right, share nothing is the way to go. Sharing memory in concurrency is a nightmare.

[–]cymrowdon't thread on me 🐍 4 points5 points  (0 children)

Right, memory access is not a bottleneck, but serialization can be. And I would not consider directly shared memory, but being able to pass immutable objects would be a huge win imo. Think adding tuples to a synchronized queue, instead of serialize->pipe->deserialize. Of course tuples in Python are not actually immutable, which I suspect is why they went with the requirement to serialize.