Concerns about weak refs and weak maps.
brendan at mozilla.com
Fri Oct 29 16:09:37 PDT 2010
On Oct 29, 2010, at 4:01 PM, felix wrote:
> On 10/29/10 15:18, Jim Deville wrote:
>> C# 4.0 has WeakMap's too, and one of the goals was to work around the cyclical reference issue:
> mono implements ConditionalWeakTable with Ephemeron tables registered with the GC. The registration does nothing with boehm-gc, but there is special handling for Ephemerons in the experimental sgen-gc, and it looks to me like it's similar to what's described on the ECMAScript wiki for WeakMap: repeatedly scan Ephemeron key,value entries for values that are newly reachable, until no more newly-reachable values are found.
> it's instrumented to count how many times it repeats the Ephemeron scan, so it probably wouldn't be too hard to get practical data on how expensive it is in real usage.
We have a patch in progress for SpiderMonkey, in this bug:
It won't be in Firefox 4.
Instrumentation is easy, the hard part (as ever) is workload selection. That would be good to build up, in advance of implementations.
More information about the es-discuss