Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ascii::Char-ify the escaping code in core #111524

Merged
merged 1 commit into from
May 20, 2023

Conversation

scottmcm
Copy link
Member

This means that EscapeIterInner::as_str no longer needs unsafe code, because the type system ensures the internal buffer is only ASCII, and thus valid UTF-8.

Come to think of it, this also gives it a (non-guaranteed) niche.

cc @BurntSushi as potentially interested
ascii::Char tracking issue: #110998

This means that `EscapeIterInner::as_str` no longer needs unsafe code, because the type system ensures the internal buffer is only ASCII, and thus valid UTF-8.
@rustbot
Copy link
Collaborator

rustbot commented May 13, 2023

r? @cuviper

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 13, 2023
@rustbot

This comment was marked as resolved.

@cuviper
Copy link
Member

cuviper commented May 19, 2023

LGTM

@bors r+

@bors
Copy link
Contributor

bors commented May 19, 2023

📌 Commit 28449da has been approved by cuviper

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 19, 2023
@bors
Copy link
Contributor

bors commented May 20, 2023

⌛ Testing commit 28449da with merge e86fd62...

@bors
Copy link
Contributor

bors commented May 20, 2023

☀️ Test successful - checks-actions
Approved by: cuviper
Pushing e86fd62 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 20, 2023
@bors bors merged commit e86fd62 into rust-lang:master May 20, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 20, 2023
@scottmcm scottmcm deleted the escape-using-ascii branch May 20, 2023 07:44
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e86fd62): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.4% [0.2%, 0.7%] 6
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.6% [-0.7%, -0.6%] 3
Improvements ✅
(secondary)
-0.5% [-0.6%, -0.4%] 3
All ❌✅ (primary) 0.1% [-0.7%, 0.7%] 9

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

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

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
10.4% [5.4%, 20.2%] 7
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 1
All ❌✅ (primary) 10.4% [5.4%, 20.2%] 7

Binary size

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

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

Bootstrap: 640.962s -> 641.899s (0.15%)

@rustbot rustbot added the perf-regression Performance regression. label May 20, 2023
@lqd
Copy link
Member

lqd commented May 20, 2023

This PR's wins are noise starting from a couple PRs ago in #109773 (comment) returning to steady state.

image

I won't mark this as triaged just yet though: we'll see what happens to html5ever in future PRs, as this change doesn't look like its most recent behavior. It's small and only in fast incremental use cases, so it may be fine either way, but the upwards trend on that benchmark is unfortunate: we've already lost half of this month's gains in incr comp.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants