Attila Szegedi wrote:
> 
> On 2008.01.16., at 20:53, Norris Boyd wrote:
> 
>> And I would certainly support moving to one of the Java collection
>> classes in ScriptableObject as long as there wasn't a negative
>> performance impact.
> 
> I can't imagine there'd be. Especially if we allowed people to somehow
> plug in a Map factory (we discussed this somewhere already about a year
> ago), so people could plug in a Map implementation of their choosing --
> i.e. the Trove project provides open addressing implementation similar
> to what Rhino uses now. People could also choose between a HashMap and
> ConcurrentHashMap based on the concurrency expectations of their data
> model. And so on.
> 
> Anyway -- I guess since you've been around the project since its
> initiation, you'd probably be the most qualified to touch that code, as
> it is a rather central piece of the library.
> 
> Attila.

I've created a patch to use a Map in ScriptableObject
https://bugzilla.mozilla.org/show_bug.cgi?id=412928

It adds a predictable iteration order which is not required by ECMA but
exists in the js implementations of different browsers.

"normal" tests pass except js1_5/extensions/regress-367501-04.js which
now causes a StackOverflow. I don't see it as a problem as it probably
comes from the way the map grows.

Execution speed seems comparable for the test suite as well as for
HtmlUnit test suite which is surely more representative of real use.

Cheers,
Marc.
-- 
Blog: http://mguillem.wordpress.com
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to