Skip to content

Conversation

@yotamofek
Copy link
Contributor

This should pre-allocate the correct size for the slot vec. Not sure how much of a difference it'll make, but let's see.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Nov 5, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 5, 2025

r? @GuillaumeGomez

rustbot has assigned @GuillaumeGomez.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@yotamofek
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Nov 5, 2025
…rom_string, r=<try>

Micro-optimize rustdoc search index parsing
@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 5, 2025
@rust-bors
Copy link

rust-bors bot commented Nov 5, 2025

☀️ Try build successful (CI)
Build commit: 68a9c0e (68a9c0e6ecf9481452ec6e82f8b0675cd643fd63, parent: 8e0b68e63cd2b7b6d18474fe6f49df6fb1570c25)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (68a9c0e): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (secondary 4.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.5% [4.5%, 4.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (primary -2.9%, secondary 3.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
6.1% [5.2%, 7.0%] 2
Improvements ✅
(primary)
-2.9% [-2.9%, -2.9%] 1
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) -2.9% [-2.9%, -2.9%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 475.57s -> 474.667s (-0.19%)
Artifact size: 390.76 MiB -> 390.71 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 6, 2025
@yotamofek
Copy link
Contributor Author

Let's see perf after #147918

@bors try @rust-timer queue

I do think the code is nicer even if not more performant, so I think we should merge this regardless.

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Nov 14, 2025
…rom_string, r=<try>

Micro-optimize rustdoc search index parsing
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 14, 2025
@rust-bors
Copy link

rust-bors bot commented Nov 15, 2025

☀️ Try build successful (CI)
Build commit: 76ad0a7 (76ad0a7f87b150391480a9e15093c0b10d36f182, parent: b6d7ff3aa71e48e2901b0900f8b5d98126b537ed)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (76ad0a7): comparison URL.

Overall result: ❌ regressions - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
3.0% [3.0%, 3.0%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.0% [3.0%, 3.0%] 1

Max RSS (memory usage)

Results (primary 2.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.1% [2.1%, 2.1%] 1

Cycles

Results (primary 2.8%, secondary -2.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.8% [2.8%, 2.8%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-2.8%, -2.8%] 1
All ❌✅ (primary) 2.8% [2.8%, 2.8%] 1

Binary size

Results (primary 1.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.1% [1.1%, 1.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.1% [1.1%, 1.1%] 1

Bootstrap: 474.001s -> 474.341s (0.07%)
Artifact size: 388.67 MiB -> 388.68 MiB (0.00%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Nov 15, 2025
@yotamofek
Copy link
Contributor Author

(regression is spurious and probably unrelated, not even for "Doc" profile)

@GuillaumeGomez
Copy link
Member

Code is shorter and no impact on perf so let's go. Thanks!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Nov 15, 2025

📌 Commit ab769ec has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 15, 2025
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 15, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 15, 2025
…_postings_from_string, r=GuillaumeGomez

Micro-optimize rustdoc search index parsing

This should pre-allocate the correct size for the `slot` vec. Not sure how much of a difference it'll make, but let's see.
bors added a commit that referenced this pull request Nov 16, 2025
Rollup of 10 pull requests

Successful merges:

 - #148416 (`vec_recycle`: implementation)
 - #148522 (Micro-optimize rustdoc search index parsing)
 - #148827 (Stabilize vec_into_raw_parts)
 - #148832 (Bump library dependencies)
 - #148836 (tweak primitive reference docs)
 - #148859 (Fix overflow-checks test for RISC-V target)
 - #148886 (Add riscv64a23-unknown-linux-gnu to build-manifest TARGETS)
 - #148956 (re-enable wasm abi test)
 - #148963 (runtest.rs: remove redundant check)
 - #148968 (Add another *ExprWithBlock* test for `try` blocks)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Nov 16, 2025
Rollup of 11 pull requests

Successful merges:

 - #148416 (`vec_recycle`: implementation)
 - #148522 (Micro-optimize rustdoc search index parsing)
 - #148827 (Stabilize vec_into_raw_parts)
 - #148832 (Bump library dependencies)
 - #148836 (tweak primitive reference docs)
 - #148859 (Fix overflow-checks test for RISC-V target)
 - #148886 (Add riscv64a23-unknown-linux-gnu to build-manifest TARGETS)
 - #148956 (re-enable wasm abi test)
 - #148963 (runtest.rs: remove redundant check)
 - #148968 (Add another *ExprWithBlock* test for `try` blocks)
 - #148984 (chore: Update annotate-snippets to 0.12.9)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1433ec4 into rust-lang:main Nov 16, 2025
12 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Nov 16, 2025
rust-timer added a commit that referenced this pull request Nov 16, 2025
Rollup merge of #148522 - yotamofek:pr/rustdoc/optimize-read_postings_from_string, r=GuillaumeGomez

Micro-optimize rustdoc search index parsing

This should pre-allocate the correct size for the `slot` vec. Not sure how much of a difference it'll make, but let's see.
@yotamofek yotamofek deleted the pr/rustdoc/optimize-read_postings_from_string branch November 17, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants