Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
rust-lang
/
rust
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
15.9k
Star
119k
Code
Issues
5k+
Pull requests
1.4k
Actions
Projects
Security and quality
6
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Split
Components
iterator to prefixed and non-prefixed versions and optimize
Components
for non-prefix path based platforms
- #156496
#156496
Open
asder8215
wants to merge 14 commits into
rust-lang:main
rust-lang/rust:main
from
asder8215:components_rewrite
asder8215/rust:components_rewrite
Copy head branch name to clipboard
Conversation
Commits
14
(14)
Checks
Files changed
Open
Split
Components
iterator to prefixed and non-prefixed versions and optimize
Components
for non-prefix path based platforms
#156496
asder8215
wants to merge 14 commits into
rust-lang:main
rust-lang/rust:main
from
asder8215:components_rewrite
asder8215/rust:components_rewrite
Copy head branch name to clipboard
Commits
Commits on Sep 16, 2026
Redesigned Components iterator to use front and back indexing instead of mutating and subslicing path field; as a result, Components iterator memory size goes from 64 bytes to 40 bytes and as_path …
Show description for a7e7281
asder8215
committed
a7e7281
View commit details
Copy full SHA for a7e7281
Browse repository at this point
Refactored some code, check subslice in fast path of Components Equality, added safety comments, and check for root dir after Prefix component (e.g., '\\?\checkout\src\tools' should produce Prefix,…
Show description for d946101
asder8215
committed
d946101
View commit details
Copy full SHA for d946101
Browse repository at this point
Optimized finding first separator in the front and back direction using iter().position()/rposition()
asder8215
committed
d90bc5b
View commit details
Copy full SHA for d90bc5b
Browse repository at this point
Renamed advanced_* functions to normalize_*, refactored code inside there to use iter().position()/.iter().rposition(), refactored code in compare_components, and removed stale comments
asder8215
committed
ebbdd88
View commit details
Copy full SHA for ebbdd88
Browse repository at this point
Removed trim_trailing_sep function inside Path::components and used Components::normalize_back instead, refactored Components::as_path code
asder8215
committed
eb32da6
View commit details
Copy full SHA for eb32da6
Browse repository at this point
Improve performance of compare_components function using what was done in previous implementation, but making it work with Components<'_> front index
asder8215
committed
0a438e9
View commit details
Copy full SHA for 0a438e9
Browse repository at this point
Separated consume_first_component function into consume_first_component_front and consume_first_component_back. Also introduced aggressive inlining.
asder8215
committed
1b334a1
View commit details
Copy full SHA for 1b334a1
Browse repository at this point
Fast path check first component if both are Some(_), do byte by byte comparison (normalizing paths if needed) and return Ordering Equal/Greater/Less if possible before needing to fall back on Itera…
Show description for a0d8560
asder8215
committed
a0d8560
View commit details
Copy full SHA for a0d8560
Browse repository at this point
Removed #[inline] on Components methods + refactored code/comments to make it simpler or have it documented in the appropriate areas, and renamed a couple of methods/field members, and simplified C…
Show description for 09bc8c7
asder8215
committed
09bc8c7
View commit details
Copy full SHA for 09bc8c7
Browse repository at this point
Optimize Path/PathBuf PartialEq trait implementation by using OsStr byte equality and Iterator::eq directly.
Show description for df72212
asder8215
and
Lfan-ke
committed
df72212
View commit details
Copy full SHA for df72212
Browse repository at this point
Implement Components iterator with a subslicing approach, add a fast path check to Components/Path equality by finding first mismatched byte, separated Components iterator into different versions a…
Show description for 36203e3
asder8215
committed
36203e3
View commit details
Copy full SHA for 36203e3
Browse repository at this point
Simplify Path PartialEq to just use Components PartialEq, optimize PartialOrd implementation for non-prefixed Components via directly comparing mismatched byte if it's not a separator byte or cur d…
Show description for f8b6538
asder8215
committed
f8b6538
View commit details
Copy full SHA for f8b6538
Browse repository at this point
Optimize Components::next, Components::next_back with using a bit more conditional style code rather than match cases (degrades Components::next_back for some reason)
asder8215
committed
aae6f2d
View commit details
Copy full SHA for aae6f2d
Browse repository at this point
Added documentation to Components::as_path clarifying that it normalizes away trailing separator bytes and non-starting current directory component a well as added Components::is_sep_byte for nonpr…
Show description for d5bfd16
asder8215
committed
d5bfd16
View commit details
Copy full SHA for d5bfd16
Browse repository at this point
You can’t perform that action at this time.