Nathan (gemsling) wrote,
Nathan
gemsling

Computing cost and elapsed time

Okay, I admit that opening a file 14334 times to see if it has a line matching the current item may not be the most efficient thing to do. In hindsight, reading the whole 2396 line data set (432 Kb) into memory might have been a better thing to do. *Taps watch*

3200 lines done so far. Time to check that I'm not "while"ing my way through every line after a match is found... Hmm, it seems that I am. Just in case an item is in there twice, though it shouldn't be. Meh. I think I'll leave it, just in case.
Tags: tech
Subscribe

  • Stymied by a generous download quota

    All I want to do is run a simple Perl script. But... It requires Net::DNS. Fortunately, Net::DNS can be easily installed by using the CPAN…

  • Local countdown

    nathanj@pecan.local> 11:59pm [~/]: date Sat 31 Dec 2011 23:59:55 EST nathanj@pecan.local> 11:59pm [~/]: date Sat 31 Dec 2011 23:59:56 EST…

  • Mac App Store first impression: utter fail

    So, I finally decided to upgrade to Lion. Only problem is that the Mac App Store is buggy and won't fully download the installer. What's really…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment