Re: reduced size symbols/keywords
- From: pjb@xxxxxxxxxxxxxxxxx (Pascal J. Bourguignon)
- Date: Fri, 29 Aug 2008 10:39:38 +0200
"John Thingstad" <jpthing@xxxxxxxxx> writes:
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.
The great languages have more than three million words. Most of them
are technical and jargon, but nonetheless you can read one million
different words.
Of course it depends on what you mean by "word", if you mean the
roots, or if you mean the various forms a word can take. But when
reading words, I guess that the various forms is what is read.
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
--
__Pascal Bourguignon__
.
- References:
- reduced size symbols/keywords
- From: verec
- Re: reduced size symbols/keywords
- From: John Thingstad
- reduced size symbols/keywords
- Prev by Date: Re: reduced size symbols/keywords
- Next by Date: Re: reduced size symbols/keywords
- Previous by thread: Re: reduced size symbols/keywords
- Next by thread: Re: reduced size symbols/keywords
- Index(es):
Relevant Pages
|