[Tutor] Reading/dealing/matching with truly huge (ascii) files

Alan Gauld alan.gauld at btinternet.com
Fri Feb 24 08:36:28 CET 2012


On 24/02/12 05:11, Elaina Ann Hyde wrote:

> Ok, if I use awk I seperate the file into an edible 240MB chunk,

Why awk? Python is nearly always faster than awk...
Even nawk or gawk. awk is a great language but I rarely
use it nowadays other than for one liners because
perl/python/ruby are all generally faster for non
trivial tasks.

split OTOH should be faster still for chunking a file.

But by keeping the chunking as part of your program you don't
have the switching time between apps.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list