rustdoc search: add performance note about searchIndexUnstable check
This commit is contained in:
parent
5e8ebd5ecd
commit
fdbc8d08a6
1 changed files with 6 additions and 0 deletions
|
|
@ -3291,6 +3291,12 @@ class DocSearch {
|
|||
}
|
||||
|
||||
// sort unstable items later
|
||||
// FIXME: there is some doubt if this is the most effecient way to implement this.
|
||||
// alternative options include:
|
||||
// * put is_unstable on each item when the index is built.
|
||||
// increases memory usage but avoids a hashmap lookup.
|
||||
// * put is_unstable on each item before sorting.
|
||||
// better worst case performance but worse average case performance.
|
||||
a = Number(
|
||||
// @ts-expect-error
|
||||
this.searchIndexUnstable.get(aaa.item.crate).contains(aaa.item.bitIndex),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue