montagejs / collections

This package contains JavaScript implementations of common data structures with idiomatic interfaces.
http://www.collectionsjs.com
Other
2.09k stars 185 forks source link

Speed improvements for Dict, significantly reducing garbage collection b... #124

Closed marchant closed 9 years ago

marchant commented 9 years ago

...y not mangling key. proto is handled as a special case on the Dict itself

marchant commented 9 years ago

Kris, second attempt at not mangling, would appreciate a quick review

marchant commented 9 years ago

All tests passing

kriskowal commented 9 years ago

Might consider having properties "hasProto" and "protoValue". There’s no need to treat the dictionary object itself as a collection. I’m sure no benchmark exercises this case, so you’d never see it slow down.

kriskowal commented 9 years ago

Consider including a benchmark. This solution looks at least like it would work.

marchant commented 9 years ago

Thanks Kris, suggestions for benchmark with current project dependencies? Improvement comes from avoiding garbage collections, so would need to prove that it would actually kicks in

montagestudio.com

Benoit Marchant CEO & Founder 1290 Oakmead Parkway,y Ste 111 Sunnyvale, CA 94085 (1) 408.621.4874 mobile Profile | @benoitmarchant

On May 4, 2015, at 19:38, Kris Kowal notifications@github.com wrote:

Consider including a benchmark. This solution looks at least like it would work.

— Reply to this email directly or view it on GitHub.