From: Sean Chittenden Date: 2001-08-25T16:10:59+09:00 Subject: [ruby-talk:20353] Re: File.readline(s) --yzvKDKJiLNESc64M Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > I am reading a 55MB ASCII file by using File.readline(s) which takes on > my machine about 22s. The same runs in Python using readlines(0x2000) in > about 9 seconds. Does anybody know whether there is a chance to speed > things up in Ruby by reading chunks like in Python. Tight iterations? Turn of garbage collection before you do the=20 readlines. GC.disable lines =3D File.readlines(s) GC.enable What kind of performance difference does that give you? -sc --=20 Sean Chittenden --yzvKDKJiLNESc64M Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Comment: Sean Chittenden iEYEARECAAYFAjuF/uQACgkQn09c7x7d+q15QgCcCVzjnDm1b2mOeXynPmyhAKMv 0PcAn3i+qUd2r0EBT9MeeQ3ChJwDJgRW =UdNW -----END PGP SIGNATURE----- --yzvKDKJiLNESc64M--