Hi Aleks,sounds like a good plan, looking forward to switching from CHM to TrieMap in Akka 2.1 :-) (just need that Hasher)Cheers,
√
On Sun, May 20, 2012 at 6:11 PM, Prokopec Aleksandar <aleksanda...@epfl.ch> wrote:
Hi!
I personally see no reason why not.
This is different than the current approach in mutable.HashTable, where an appropriate method should be overridden to achieve the same effect.
But I think it's a better approach to have a custom Hasher object, due to the fact that calling `par` on an overridden hashtable would produce a parallel hash table which "forgets" the original hashing strategy. So, maybe we should do the same thing there.
Cheers,
Alex
________________________________________
From: scala-internals@googlegroups.com [scala-internals@googlegroups.com] on behalf of √iktor Ҡlang [viktor...@gmail.com]
Sent: 20 May 2012 18:06
Subject: [scala-internals] TrieMap & Hasher
Typesafe<http://www.typesafe.com/> - The software stack for applications that scale
Hey,
could we add the opportunity to specify a Hasher into TrieMap, so if I need to create an IdentityTrieMap or just want to improve the hash of a known bad implementation I can override the default which would be key.##?
Cheers,
√
--
Viktor Klang
Akka Tech Lead
Twitter: @viktorklang
We were just talking about this in a meeting, and Martin remarked that we should do this factoringas high up as possible in the hierarchy. It's also a nice opportunityto unify WeakIdentityHashMap and WeakHashMap
Yep. I agree. How to accomplish this though.....
And all this just to change String.hashCode without actually changing String.hashCode (because that would require a spec change)?
- Josh
√
From: scala-i...@googlegroups.com [scala-i...@googlegroups.com] on behalf of √iktor Ҡlang [viktor...@gmail.com]
Sent: 20 May 2012 18:06
Subject: [scala-internals] TrieMap & Hasher
Typesafe<http://www.typesafe.com/> - The software stack for applications that scale
Hey,
could we add the opportunity to specify a Hasher into TrieMap, so if I need to create an IdentityTrieMap or just want to improve the hash of a known bad implementation I can override the default which would be key.##?
Cheers,
√
--
Viktor Klang
Akka Tech Lead
Twitter: @viktorklang
--
Viktor Klang
Akka Tech Lead
--
Viktor Klang
Akka Tech Lead
I think that maybe we should have a Hashing typeclass, similar to Ordering typeclass, for collections which use custom hashing.
It would have a default value or a globally available implicit value which just uses `hashCode()`.
True. Do you have a link to the current weakidentity hashmap implementation?
Please don't make those global names. We're using === for equality in the SLICK query language, and I suppose many other DSLs do the same.
BTW, !== is a bad choice because it has the wrong precedence. SLICK is using using =!= instead. Witness: