Welcome to the Monastery | |
PerlMonks |
Re: Fast - Compact That Stringby CountZero (Bishop) |
on Feb 09, 2012 at 23:42 UTC ( [id://952887]=note: print w/replies, xml ) | Need Help?? |
Using Bit::Vector. I know, Bit::Vector is an XS-module, so it doesn't comply with your specs. On my old laptop, it reads a file of 1 million strings, converts them to the compacted format and reconverts them to the original format (to make sure it worked) in 100 seconds. CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
In Section
Seekers of Perl Wisdom
|
|