Project

General

Profile

Actions

Feature #3228

closed

speedup File.read

Added by rogerdpack (Roger Pack) over 14 years ago. Updated over 13 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:29906]

Description

=begin
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
=end


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #1332: Reading file on Windows is 500x slower then with previous Ruby versionClosedakr (Akira Tanaka)03/30/2009Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0