Consider adding a data structure that combines a Vector + HashSet/HashMap

NEW
Unassigned

Status

()

P3
normal
2 years ago
a year ago

People

(Reporter: jandem, Unassigned)

Tracking

({triage-deferred})

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
See bug 1342345. Especially maps/sets that use MovableCellHasher have significant overhead and it would be nice to use a Vector up to length 30 or so to handle the small-number-of-entries cases that are pretty common.

We already have InlineSet/InlineMap in js/src/ds/InlineTable.h that stores the entries inline, maybe we should just change that to use a Vector instead of an array. Ideally we'd use something like mozilla::MaybeOneOf so we don't need space for both the Vector and HashMap/HashSet.

We could use this for the cycle detection classes for instance.
(Reporter)

Updated

2 years ago
See Also: → bug 1342345
Keywords: triage-deferred
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.