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 2627517D914C for ; Thu, 10 Jul 2014 00:42:26 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (smtp.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 79152B5D884 for ; Thu, 10 Jul 2014 01:05:47 +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 9FC4597A82B for ; Thu, 10 Jul 2014 01:05: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 SDR8IrItirZS for ; Thu, 10 Jul 2014 01:05: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 6402C97A820 for ; Thu, 10 Jul 2014 01:05: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 A849A952439 for ; Thu, 10 Jul 2014 01:05:42 +0900 (JST) Received: from [221.186.184.76] (unknown [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id B7762120446; Thu, 10 Jul 2014 01:05:33 +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 7EB1F120433 for ; Thu, 10 Jul 2014 01:05:29 +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=eaMkdhRTqJgvxY8M/LbJH95F724=; b=jdtDqjyPoYnV2pO2lC pjcr8Kek+m6kqd5yRyCuSmVB118q8COvBeFVAd/31hsug3KZ/2TejZowfblbuOLo 2py5bCXty6sUQiWKJNuBeGBwZ2iB52PtASJ3kWZGJQ5Q/vULl7G6KHRL3TU9uHH0 /rgxJp4f9nKgPxhUlRqWZx5hE= Received: by mf171.sendgrid.net with SMTP id mf171.18715.53BD68464A 2014-07-09 16:05:26.893563207 +0000 UTC Received: from herokuapp.com (ec2-54-197-40-71.compute-1.amazonaws.com [54.197.40.71]) by ismtpd-006.iad1.sendgrid.net (SG) with ESMTP id 1471bdf4c17.2a8f.2c9065 for ; Wed, 09 Jul 2014 16:05:24 +0000 (GMT) Date: Wed, 09 Jul 2014 16:05:24 +0000 From: tenderlove@ruby-lang.org 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: 37706 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 10015 X-Redmine-Issue-Author: tenderlovemaking X-Redmine-Sender: tenderlovemaking X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: OOF Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS6MUnswBLWoS2KRbBMyuofBZGRJpGf4aesXet5uVI28t1qK8wUNdWoVYPo0IZgpBLdLhnIvrokyZ/MoD+2rZ7GXvAsD6NKNoJ/BFUIqroL5o9LOcd1sLtVs61ouRcKV36w= X-ML-Name: ruby-core X-Mail-Count: 63608 Subject: [ruby-core:63608] [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 Aaron Patterson. Thanks nobu, I really appreciate it! If it can't be fixed, I have ideas for avoiding the calls to Dir#[], but it will take time to get merged and released. ---------------------------------------- Bug #10015: Performance regression in Dir#[] https://bugs.ruby-lang.org/issues/10015#change-47664 * Author: Aaron Patterson * Status: Open * Priority: Normal * Assignee: * Category: * Target version: * 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/