ruby/benchmark/file_expand_path.yml
Jean Boussier 36b0ae025a Add single byte fast path to File.expand_path
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|
2026-04-10 08:37:12 +02:00

5 lines
113 B
YAML

prelude: |
# frozen_string_literal: true
benchmark:
expand_path: File.expand_path("../../foo.txt", __FILE__)