storing the hash multiplier instead of the hash value
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue Mar 23 13:36:58 PDT 2010
On 03/23/2010 02:34 PM, Fawzi Mohamed wrote:
>
> On 23-mar-10, at 19:04, Andrei Alexandrescu wrote:
>
>> What I'm pushing for as of now is to move the associative array
>> definition from opacity into templated goodies in object_.d.
>
> that would be nice, that is one the main reasons Steven implementation
> is faster.
> It would be nice if this would be done by the compiler as rewriting the
> calls as call to "normal" templates, i.e. to a specially named templated
> struct (AArray for example) so that (syntactic sugar for the name aside)
> that would be the same as a library implementation.
> This would have two advantages:
> - easy to replace the library implementation, as it would be even less
> special
> - easy to replace the usage in one piece of code with another
> implementation (well truth to be told that is rather easy also now)
I have much loftier goals, which scare Walter sometimes :o). In the long
term, my plan is to allow object.d to decide on a number of fundamental
program-wide choices, such as the use of mark-sweep GC versus reference
counting GC. In wake of my experience with D in heavyset programs, I
reckon that there is a necessity to have deterministic memory management
for a subset of applications.
Walter is afraid that that's going to mean the balkanization of D -
everyone will define their own object.d. That may be a risk, but I
strongly believe it's a risk worth taking.
Andrei
More information about the Digitalmars-d
mailing list