From 6f8ece0690d5a314710f9b0a6b080b539ee6dd67 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 7 May 2026 18:05:19 +0900 Subject: pathname: Add simple benchmarks --- benchmark/pathname.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 benchmark/pathname.yml 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') -- cgit v1.2.3