About producing a lot of the symbols

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

About producing a lot of the symbols

stéphane ducasse-2
Hi

I would like to know whether there are pratical issues with producing  
too much symbols (especially
when we know that unique identity is not required).

Stef

Reply | Threaded
Open this post in threaded view
|

Re: About producing a lot of the symbols

Andres Valloud-2
Hello stéphane,

Sunday, August 27, 2006, 10:50:25 AM, you wrote:

sd> I would like to know whether there are pratical issues with
sd> producing too much symbols (especially when we know that unique
sd> identity is not required).

Identity hash is not very big, and because String>>hash is rather
deficient in VW, then internment / set / dictionary performance won't
be very good.  I'd implement a really good hash for Strings and
Symbols first, implement it as a primitive, and then change the
SymbolTable to a single WeakSet... like in Squeak.

Squeak's hash, suggested by Mr. van der Gulik, is truly awesome.

But of course I am biased because Luciano and I implemented all of
that in Squeak to begin with :).

--
Best regards,
 Andres                            mailto:[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: About producing a lot of the symbols

Reinout Heeck-2
In reply to this post by stéphane ducasse-2
Hi Stef,

Too much is always too much ;-).

I'm afraid we need a little bit more context.

Why aren't they just strings? The uniqueness of symbols can even help to
reduce memory demand. The lifetime of the symbols might be an issue.
Otherwise, problems are hard to predict. Once you identified a problem,
you can think of alternatives.

I couldn't resist, I'm working on my ESUG talk about code optimization. ;-)

cu,
Adriaan.
> Hi
>
> I would like to know whether there are pratical issues with producing
> too much symbols (especially
> when we know that unique identity is not required).
>
> Stef
>
>


--
http://vdg38bis.xs4all.nl