From: "Radosław Bułat" Date: 2008-02-12T23:08:55+09:00 Subject: Re: very bad character performance on ruby1.9 > What is your locale's encoding? That gpl-2.0.txt file contains extended > characters, and slice performs with O(n) on multibyte strings, so of > course then it's slower. Since my locale is UTF-8 I had to change your > script from > File.read("gpl-2.0.txt") > to > File.open("gpl-2.0.txt", "r:iso-8859-1"){|f|f.read} > in order to get correct results. > Thanks, it helped. -- Rados�aw Bu�at http://radarek.jogger.pl - m�j blog