axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Spad and its object model


From: Gabriel Dos Reis
Subject: Re: [Axiom-developer] Spad and its object model
Date: Mon, 11 Jun 2007 15:20:51 -0500 (CDT)

On Mon, 11 Jun 2007, Stephen Wilson wrote:

| > I guess what I trying to get at is what are the benefits of those 
| > additional indirections over simple, hash table representation.
| 
| I would imagine that the vast number of lookups would suffice with an
| integer index.  Tiny fraction would require higher level keys. 

Lookup with integer index is OK when you have all information at the
same place and at the same time and have a way to enforce its
semantics.  Currently, Spad is such that one needs to have all
the information when constructing the vtable but there is no means
to enforce consistency.  Going to a world with "extend" makes
the problem even more accute.

| 
| > >From all I can see, the "index" key relies on order declaration which is a
| > non-started.  The scheme "name" key is essentiablly equivalent to using a 
hash
| > table.  If an extrat indirection is required to get the type, what is he
| > point?  
| 
| This indirection could certainly be made fast, probably on par with a
| hash.

How would that be faster than the scheme that uses only one lookup?

| I dont think of the integer index as having anything to do with the
| order of declarations.

Please elaborate on its semantics then.

[...]

| Well, intern happens at runtime quite often,

Not, in the scheme I'm proposing.

| but thats not the point.
| Im surprised that you would want to use strings. 

I don't want to use strings.  I want to use symbols.  I mentioned
string to explain how the symbol is used.  How can that be surprising?

| [...] If you are constantly converting
| from, say, a struct representation to the corresponding string,

But, I'm not doing that.

-- Gaby




reply via email to

[Prev in Thread] Current Thread [Next in Thread]