From: Roger Pack Date: 2010-05-01T05:26:26+09:00 Subject: [ruby-core:29906] [Bug #3228] speedup File.read Bug #3228: speedup File.read http://redmine.ruby-lang.org/issues/show/3228 Author: Roger Pack Status: Open, Priority: Normal ruby -v: ruby 1.9.2dev (2010-05-01 trunk 27570) [i686-linux] Appears from http://www.ruby-forum.com/topic/209005 that File.read could be sped up by first requesting the file's size, then reading that much. File.read('a', File.size('a')) # faster than just File.read('a') by about 15% in Linux/Windows in windows, it also speeds up ascii reading dramatically, which was unexpected, but nice. Cheers! -rp ---------------------------------------- http://redmine.ruby-lang.org