Re: reduced size symbols/keywords
- From: "John Thingstad" <jpthing@xxxxxxxxx>
- Date: Fri, 29 Aug 2008 09:47:41 +0200
På Fri, 29 Aug 2008 07:39:14 +0200, skrev verec <verec@xxxxxxx>:
Toying, toying ... rather than doing useful work ... (Kenny must be
right after all :-)
As far as I know there is no way to make symbols any smaller.
A more serious problem that the size is that it makes a package a leaky abstraction.
You export a function you automatically export the variable with the same name as well as the plist, class etc.
This question is not (entirely) rhetoric, as I'm thinking of some
application reading 1,000,000s words out of text files and turning them
into symbols/keywords for processing. Cutting down the memory
footprint by half or more would be extremely significant, while still
preserving "most" of the properties of symbols, while sacrifing a few,
ie, while
But not 1,000,000 DIFFERENT words I trust.
With that voulume wouldn't a hash table be a better choice anyhow?
I find that plist's are best for 100 elements or less.
The standard way of dealing with this is to Goedelize it yourself.
Your file reads the words as strings.
They are stored in a hash table and assigned a number.
Each time you see a string look the number up in the hash table. If it is not there generate a new number and store (string - value) there.
This is more compact.
--------------
John Thingstad
.
- Follow-Ups:
- Re: reduced size symbols/keywords
- From: Pascal J. Bourguignon
- Re: reduced size symbols/keywords
- References:
- reduced size symbols/keywords
- From: verec
- reduced size symbols/keywords
- Prev by Date: Re: Gene Expression Programming(GEP)
- Next by Date: Re: reduced size symbols/keywords
- Previous by thread: reduced size symbols/keywords
- Next by thread: Re: reduced size symbols/keywords
- Index(es):
Relevant Pages
|