From: Hugh Sasse Date: 2005-09-07T06:54:53+09:00 Subject: Re: Sorted arrays On Wed, 7 Sep 2005, Ara.T.Howard wrote: > On Wed, 7 Sep 2005, Hugh Sasse wrote: > >> I found that the real time-killer was the CSV library itself. This is fair [...] >> was much faster to use split to separate the fields -- by which I mean that > > this is exactly the approach i always use with csv: i split the first line, > remember the number of fields, and continue splitting - checking that the > numbe of fields is the same, iff it is not i parse the failed line using csv. > this approach is fast and handles certain conditions like quoted/escaped Oh, that's rather neat. > commas. it doesn't handle csv lines that span multiple lines... but the > speedup is worth it. [...] >> Yes, and I do wonder (as someone who has not looked at the code to this >> extent) how much more speed we could wring out of the ruby implementations. > > trees are pretty nice - good performance for everything - ruby could use one. But there are so many types to choose from... :-) > > cheers. > > -a Hugh