Question about Python threads
Delaney, Timothy
tdelaney at avaya.com
Mon Aug 26 23:43:25 EDT 2002
More information about the Python-list mailing list
Mon Aug 26 23:43:25 EDT 2002
- Previous message (by thread): Question about Python threads
- Next message (by thread): Question about Python threads
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> From: Greg Ewing [mailto:see_reply_address at something.invalid] > > Refcounts are by no means the only reason Python has > a GIL. Even without refcounting, lack of a GIL would > require locks around many other things, e.g. anything > which mutates an object (inserting/deleting list > items, etc.) Also object allocation, which I suspect > Python does a lot more of than Java, since Java has > unboxed ints/floats/etc. Nah Greg - Java tends to do a lot more allocation. I base this on a few observations: 1. Every time you want to use a collection class, you have to wrap primitives in objects. 2. CPython interns the most-used integers and strings. 3. Java apps appear to use much more memory for the same task in most cases. Admittedly, there is no scientific basis to any of the above, but you have to admit it's compelling ;) Tim Delaney
- Previous message (by thread): Question about Python threads
- Next message (by thread): Question about Python threads
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list