Skip to content

Add single byte fast path to File.expand_path#16697

Merged
byroot merged 1 commit intoruby:masterfrom
byroot:expand-path-mbenc
Apr 10, 2026
Merged

Add single byte fast path to File.expand_path#16697
byroot merged 1 commit intoruby:masterfrom
byroot:expand-path-mbenc

Conversation

@byroot
Copy link
Copy Markdown
Member

@byroot byroot commented Apr 9, 2026

Similar to previous changes to File.join & al.

compare-ruby: ruby 4.1.0dev (2026-04-09T12:24:09Z master c919778017) +PRISM [arm64-darwin25]
built-ruby: ruby 4.1.0dev (2026-04-09T17:42:24Z expand-path-mbenc 4fd047f73c) +PRISM [arm64-darwin25]
compare-ruby built-ruby
expand_path 719.828k 1.922M
- 2.67x

@byroot byroot force-pushed the expand-path-mbenc branch from 0bb4a7e to 630df75 Compare April 9, 2026 17:51
Similar to previous changes to `File.join` & al.

```
compare-ruby: ruby 4.1.0dev (2026-04-09T12:24:09Z master c919778) +PRISM [arm64-darwin25]
built-ruby: ruby 4.1.0dev (2026-04-09T17:42:24Z expand-path-mbenc 4fd047f73c) +PRISM [arm64-darwin25]
```

|             |compare-ruby|built-ruby|
|:------------|-----------:|---------:|
|expand_path  |    719.828k|    1.922M|
|             |           -|     2.67x|
@byroot byroot force-pushed the expand-path-mbenc branch from 630df75 to ac4c95b Compare April 9, 2026 21:27
@byroot byroot merged commit 36b0ae0 into ruby:master Apr 10, 2026
101 of 103 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant