• 0 Posts
  • 404 Comments
Joined 1 year ago
cake
Cake day: July 18th, 2023

help-circle







  • Yeah, but have we really returned to what 2016 was like? This is the issue with a lot of analysis like this, lots of internal bias in the underlying approach.

    He could very well be right, but it’s just as likely we’re closer to 2020 than 2016. I know a lot of people that have gone to full mail-in-ballot (since covid) and I know others concerned the mail-is will be tampered with (given some have been set on fire). Not sure either of those things were in play back in 2016.








  • Threads all run on the same core, processes can run on different cores.

    Because threads run on the same core, the only time they can improve performance is if there are non-cpu tasks in your code - usually I/O operations. Otherwise the only thing multi threading can provide is the appearance of parallelism (as the cpu jumps back and forth between threads progressing each in small steps).

    On the other hand, multiprocessing allows you to run code on different cores, meaning you can take full advantage of all your processing power. However, if youre program has a lot of I/O tasks, you might end up bottlenecked by the I/O and never see any improvements.

    For the example you mentioned, it’s likely threading would be the best as it’s got a little less overhead, easier to program, and you’re task is mostly I/O bound. However, if the calculations are relatively quick, it’s possible you wouldn’t see any improvement as the cpu would still end up waiting for the I/O.