[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-core
Subject: [ruby-core:68684] [Ruby trunk - Bug #10015] Performance regression in Dir#[]
From: adrien.siami () gmail ! com
Date: 2015-03-30 10:00:14
Message-ID: redmine.journal-51972.20150330100013.99913250f6a4b758 () ruby-lang ! org
[Download RAW message or body]
Issue #10015 has been updated by Adrien Siami.
Mac OS X Yosemite with the standard filesystem, I believe HFS+ Insensitive
----------------------------------------
Bug #10015: Performance regression in Dir#[]
https://bugs.ruby-lang.org/issues/10015#change-51972
* Author: Aaron Patterson
* Status: Feedback
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.2.0dev (2014-02-04 trunk 44802) [x86_64-darwin13.0]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
r44802 seems to have introduced a performance regression in Dir#[].
Here is the test program:
~~~ruby
require 'benchmark'
puts Benchmark.realtime {
glob = "minitest/*_plugin.rb{,.rb,.bundle}"
$LOAD_PATH.map { |load_path|
Dir["#{File.expand_path glob, load_path}"]
}.flatten.select { |file| File.file? file.untaint }
}
~~~
Here is the test time for me:
~~~
$ ruby -v test.rb
ruby 2.2.0dev (2014-02-04 trunk 44801) [x86_64-darwin13.0]
0.000341
$ ruby -v test.rb
ruby 2.2.0dev (2014-02-04 trunk 44802) [x86_64-darwin13.0]
0.009333
~~~
r44801 seems much faster than r44802.
--
https://bugs.ruby-lang.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic