 |
Forums |
Admin Start New Thread
| Message: 7899 |
 |
BY: James Gray (bbazzarrakk) DATE: 2006-02-27 21:18 SUBJECT: RE: Move tc_speed.rb I thought a lot about this before building the project.
The library is called *Faster*CSV and its first stated design goal is to be significantly faster than CSV, so I feel at least some obligation to prove it.
To do so, I parse a (scrambled) real-world data file with both libraries and assert that FasterCSV is at least three times as fast for the task. (The test is actually so slow because you are waiting on CSV most of the time!) It's actually closer to nine times faster currently, so that gives plenty of room for me to add new features. If those tests start to fail, I think it will be a helpful warning to me.
As an asside, those test verify that FasterCSV and CSV parse that data file identically, which seems to be important to users considering a switch.
I don't use Benchmark in these tests because I am not trying to impress people with numbers (there is a Rake task for that). Instead, I intend these tests to be a safety net for me durring development.
All that said, I do realize they are slow and I will see if I can't speed them up a bit.
Thanks for the feedback.
James Edward Gray II
| |
Thread View
Post a followup to this message
|
 |