Message101146
I absolutely agree 100% that it is not worth trying to fix the GIL for every conceivable situation (although if you could, I wouldn't complain).
To me, there are really only two scenarios worth worrying about:
1. Get rid of all of that multicore lock thrashing that happens if there are multiple CPU-bound threads competing. Python programmers should know that intentionally using threads like this won't offer a performance boost. However, it would still be nice to avoid all of that needless overhead when it happens by design or by accident (the new GIL already addresses this).
2. Make sure that you can get reasonable I/O performance when there is *one* CPU-bound thread competing with some background I/O processing. This covers the use case of overlapped I/O and computation as well as almost every practical problem related to communicating processes, multiprocessing, queuing, etc.
As for everything else, it's probably not worth worrying about so much. If someone is only doing I/O (e.g., a web server), their code is going to behave about the same as before (although maybe slightly better under heavy load if there's less GIL contention). Situations where someone intentionally tries to set up multiple long-running CPU-bound threads seems pretty unlikely---the very presence of the GIL wouldn't make that kind of programming model attractive in the first place, so why would they do it? |
|
Date |
User |
Action |
Args |
2010-03-16 02:06:53 | dabeaz | set | recipients:
+ dabeaz, loewis, jhylton, pitrou, eric.smith, kevinwatters, tarek, karld, carljm, coderanger, nirai, alex, brian.curtin, flox, DazWorrall, rh0dium, rcohen, mahmoudimus |
2010-03-16 02:06:52 | dabeaz | set | messageid: <1268705212.92.0.233225624267.issue7946@psf.upfronthosting.co.za> |
2010-03-16 02:06:50 | dabeaz | link | issue7946 messages |
2010-03-16 02:06:49 | dabeaz | create | |
|