Skip to content

Commit 03e9f5c

Browse files
Auto merge of #149472 - notriddle:stringdex/20251127, r=<try>
[PERF] try stringdex next version
2 parents 03ce87d + 49e2c08 commit 03e9f5c

File tree

5 files changed

+427
-201
lines changed

5 files changed

+427
-201
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5357,10 +5357,10 @@ dependencies = [
53575357
[[package]]
53585358
name = "stringdex"
53595359
version = "0.0.3"
5360-
source = "registry+https://github.com/rust-lang/crates.io-index"
5361-
checksum = "556a6126952cb2f5150057c98a77cc6c771027dea2825bf7fa03d3d638b0a4f8"
5360+
source = "git+https://gitlab.com/notriddle/stringdex?rev=349c7cee0fb7cbb4710ec03c96e0f9593c92d0e1#349c7cee0fb7cbb4710ec03c96e0f9593c92d0e1"
53625361
dependencies = [
53635362
"stacker",
5363+
"thin-vec",
53645364
]
53655365

53665366
[[package]]

src/librustdoc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ rustdoc-json-types = { path = "../rustdoc-json-types" }
2121
serde = { version = "1.0", features = ["derive"] }
2222
serde_json = "1.0"
2323
smallvec = "1.8.1"
24-
stringdex = "=0.0.3"
24+
stringdex = { git = "https://gitlab.com/notriddle/stringdex", rev = "349c7cee0fb7cbb4710ec03c96e0f9593c92d0e1" }
2525
tempfile = "3"
2626
threadpool = "1.8.1"
2727
tracing = "0.1"

src/librustdoc/html/static/js/search.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,6 +1799,20 @@ class DocSearch {
17991799
if (pb[i] === 0) {
18001800
invertedFunctionInputsIndex.push(RoaringBitmap.empty());
18011801
i += 1;
1802+
} else if (pb[i] < 0x3a) {
1803+
let bitmap = new RoaringBitmap(null);
1804+
const l = pb[i];
1805+
i += 1;
1806+
for (let j = 0; j < l; ++j) {
1807+
bitmap = bitmap.union(RoaringBitmap.makeSingleton(
1808+
pb[i] +
1809+
(pb[i + 1] << 8) +
1810+
(pb[i + 2] << 16) +
1811+
(pb[i + 3] << 24),
1812+
));
1813+
i += 4;
1814+
}
1815+
invertedFunctionInputsIndex.push(bitmap);
18021816
} else {
18031817
const bitmap = new RoaringBitmap(pb, i);
18041818
i += bitmap.consumed_len_bytes;
@@ -1812,6 +1826,20 @@ class DocSearch {
18121826
if (pb[i] === 0) {
18131827
invertedFunctionOutputIndex.push(RoaringBitmap.empty());
18141828
i += 1;
1829+
} else if (pb[i] < 0x3a) {
1830+
let bitmap = new RoaringBitmap(null);
1831+
const l = pb[i];
1832+
i += 1;
1833+
for (let j = 0; j < l; ++j) {
1834+
bitmap = bitmap.union(RoaringBitmap.makeSingleton(
1835+
pb[i] +
1836+
(pb[i + 1] << 8) +
1837+
(pb[i + 2] << 16) +
1838+
(pb[i + 3] << 24),
1839+
));
1840+
i += 4;
1841+
}
1842+
invertedFunctionOutputIndex.push(bitmap);
18151843
} else {
18161844
const bitmap = new RoaringBitmap(pb, i);
18171845
i += bitmap.consumed_len_bytes;
@@ -1865,6 +1893,20 @@ class DocSearch {
18651893
if (pb[i] === 0) {
18661894
invertedFunctionSignatureIndex.push(RoaringBitmap.empty());
18671895
i += 1;
1896+
} else if (pb[i] < 0x3a) {
1897+
let bitmap = new RoaringBitmap(null);
1898+
const l = pb[i];
1899+
i += 1;
1900+
for (let j = 0; j < l; ++j) {
1901+
bitmap = bitmap.union(RoaringBitmap.makeSingleton(
1902+
pb[i] +
1903+
(pb[i + 1] << 8) +
1904+
(pb[i + 2] << 16) +
1905+
(pb[i + 3] << 24),
1906+
));
1907+
i += 4;
1908+
}
1909+
invertedFunctionSignatureIndex.push(bitmap);
18681910
} else {
18691911
const bitmap = new RoaringBitmap(pb, i);
18701912
i += bitmap.consumed_len_bytes;

0 commit comments

Comments
 (0)