[Python-Dev] Rethinking intern() and its data structure (original) (raw)
Benjamin Peterson benjamin at python.org
Fri Apr 10 03:01:50 CEST 2009
- Previous message: [Python-Dev] Rethinking intern() and its data structure
- Next message: [Python-Dev] Rethinking intern() and its data structure
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2009/4/9 Greg Ewing <greg.ewing at canterbury.ac.nz>:
John Arbash Meinel wrote:
And when you look at the intern function, it doesn't use setdefault logic, it actually does a get() followed by a set(), which means the cost of interning is 1-2 lookups depending on likelyhood, etc. Keep in mind that intern() is called fairly rarely, mostly only at module load time. It may not be worth attempting to speed it up.
That's very important, though, for a command line tool for bazaar. Even a few fractions of a second can make a difference in user perception of speed.
-- Regards, Benjamin
- Previous message: [Python-Dev] Rethinking intern() and its data structure
- Next message: [Python-Dev] Rethinking intern() and its data structure
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]