Re: [Python-Dev] Keeping interned strings in a set

2006-06-15 Thread Alexander Belopolsky
On Jun 15, 2006, at 10:29 PM, Raymond Hettinger wrote: > > Nicely done. It is fine by me if this goes in so we save a little > space in the intern table. Thanks for the good word. I've reworked the code a little bit and fixed the comments. I don't have svn write access, so someone else

Re: [Python-Dev] Keeping interned strings in a set

2006-06-15 Thread Raymond Hettinger
Alexander Belopolsky wrote: > This is very raw, but in the spirit of "release early and often", > here it is: > > http://sourceforge.net/tracker/download.php? > group_id=5470&atid=305470&file_id=181807&aid=1507011 > > On Jun 15, 2006, at 8:47 PM, Raymond Hettinger wrote: > >> >> I would be curi

Re: [Python-Dev] Keeping interned strings in a set

2006-06-15 Thread Alexander Belopolsky
This is very raw, but in the spirit of "release early and often", here it is: http://sourceforge.net/tracker/download.php? group_id=5470&atid=305470&file_id=181807&aid=1507011 On Jun 15, 2006, at 8:47 PM, Raymond Hettinger wrote: > > I would be curious to see your patch. > > > Raymond ___

Re: [Python-Dev] Keeping interned strings in a set

2006-06-15 Thread Raymond Hettinger
Alexander Belopolsky wrote: >As an exercise in using the new set C API, I've replaced the >"interned" dictionary in stringobject.c with a set. Surprisingly, >what I thought would be a simple exercise, took several hours to >implement and debug. Two problems are worth mentioning: > >1. I had to a

Re: [Python-Dev] Keeping interned strings in a set

2006-06-15 Thread Neal Norwitz
On 6/15/06, Alexander Belopolsky <[EMAIL PROTECTED]> wrote: > As an exercise in using the new set C API, I've replaced the > "interned" dictionary in stringobject.c with a set. > > If there is any interest, I will submit a patch, but it does not seem > to affect performance in any meaningful way.

[Python-Dev] Keeping interned strings in a set

2006-06-15 Thread Alexander Belopolsky
As an exercise in using the new set C API, I've replaced the "interned" dictionary in stringobject.c with a set. Surprisingly, what I thought would be a simple exercise, took several hours to implement and debug. Two problems are worth mentioning: 1. I had to add a function to setobject.h to ret