From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 0A94B194008A for ; Mon, 8 Jun 2015 19:43:12 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 256F7B5D89A for ; Mon, 8 Jun 2015 20:03:46 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 7995C97A834 for ; Mon, 8 Jun 2015 20:03:48 +0900 (JST) X-Virus-Scanned: amavisd-new at nagaokaut.ac.jp Authentication-Results: funfun.nagaokaut.ac.jp (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=sendgrid.me Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QWL4_hXKve80 for ; Mon, 8 Jun 2015 20:03:48 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 34EBE97A82C for ; Mon, 8 Jun 2015 20:03:48 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id B895A95241A for ; Mon, 8 Jun 2015 20:03:44 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id B1167120440; Mon, 8 Jun 2015 20:03:42 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o10.shared.sendgrid.net (o10.shared.sendgrid.net [173.193.132.135]) by neon.ruby-lang.org (Postfix) with ESMTPS id E14AB12040E for ; Mon, 8 Jun 2015 20:03:39 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=9K4xvWBUXBGacU68kTuYD4MD8bQ=; b=nOVlxCV8faRrLNbbUe GpnCP6wMHjM4K/jNoxZPn5ZbfsMTu+k8jWNM9/NFb7W2UNGN+MH5XumymjwCReZC i07JM1CPQK+Dxkch4X7byNdP6aTqup8qUX+dwUBGBrzJl5/eRqVzpQgNbL5lR0pA bRsqBLE7mz04/78Qc5v9cpOTU= Received: by filter0500p1mdw1.sendgrid.net with SMTP id filter0500p1mdw1.2416.5575767B14 2015-06-08 11:03:27.55916439 +0000 UTC Received: from herokuapp.com (ec2-54-80-71-249.compute-1.amazonaws.com [54.80.71.249]) by ismtpd-042 (SG) with ESMTP id 14dd2d6e1b1.5174.b3ca18 Mon, 08 Jun 2015 11:03:27 +0000 (UTC) Date: Mon, 08 Jun 2015 11:03:27 +0000 From: karklinsh@gmail.com To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 43975 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 10015 X-Redmine-Issue-Author: tenderlovemaking X-Redmine-Sender: mkarklins X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS6YLZyp9BBk0Xadb9wMow49eQnjm5qQgBRybh 697D3CUXr/vLWDbw4CJT5X19PqLFe0TaoJarXiDK7iTEpLWdAKSfPX4aNukpQqyUROHm9TV4YN8DsD raW1XHjKvU5y5uTrmRuW5KxOoC0gfhO7hMqC X-ML-Name: ruby-core X-Mail-Count: 69492 Subject: [ruby-core:69492] [Ruby trunk - Bug #10015] Performance regression in Dir#[] X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #10015 has been updated by Magnuss Karklins. Experiencing similar results with Adrien's benchmark: With **ruby-2.2.2**: 2.9347980790189467 WIth **ruby-2.1.5**: 1.848318 OS X Yosemite 10.10.3, Journaled HFS+ file system. ---------------------------------------- Bug #10015: Performance regression in Dir#[] https://bugs.ruby-lang.org/issues/10015#change-52795 * 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/