diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2026-05-07 18:05:19 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu.nakada@gmail.com> | 2026-05-13 17:37:48 +0900 |
| commit | 6f8ece0690d5a314710f9b0a6b080b539ee6dd67 (patch) | |
| tree | 03fef4a4549adb11fb5c5ac0bef4d26b0592af78 | |
| parent | 407398b079b9191740b28856a8036ca01810144c (diff) | |
pathname: Add simple benchmarks
| -rw-r--r-- | benchmark/pathname.yml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/benchmark/pathname.yml b/benchmark/pathname.yml new file mode 100644 index 0000000000..bcf3011eab --- /dev/null +++ b/benchmark/pathname.yml @@ -0,0 +1,15 @@ +prelude: | + abs = Pathname("/a") + rel = Pathname("a") + p1 = Pathname.new('foo/././././bar') + p2 = Pathname.new('foo/bar/./../..') + p3 = Pathname.new('foo/bar/zot') +benchmark: + p1+p2: p1+p2 + abs.root?: abs.root? + rel.root?: rel.root? + abs.absolute?: abs.absolute? + rel.absolute?: rel.absolute? + p1.cleanpath: p1.cleanpath + p2.cleanpath: p2.cleanpath + relative_path_from: p3.relative_path_from('foo/bar/qux/quax') |
