this post was submitted on 10 Aug 2024
25 points (100.0% liked)
Python
148 readers
1 users here now
A community for discussing the Python programming language.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
But with multiprocessing you're paying extra cycles to serialize and deserialize with those data structures (plus the added cost of storing copies in multiple places), and processes are much heavier to spin up...
Yeah, there is overhead. It's not so critical for Python, because I am using it for scripting and prototyping, and when I need performance, I rewrite critical code parts in C++.