View Single Post
Old 03-03-2009, 01:31 AM   #12 (permalink)
ETbyrne
how quixotic are you?
 
ETbyrne's Avatar
 
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
ETbyrne is on a distinguished road
Default

Attached are the scripts I used to do the same test on a similar file. Takes me about 60 ms to run huge_select.php

Note that this is being run on a ~ 8.5 MB 1 million line file. I also ran these tests on the file listed above.

Run huge_create.php first, then huge_select.php. files.php is a file class I made, file::scan() is a wrapper for the fscanf function. The other php file is the class used for benchmarking.

It worked on my and my friend's server so I'm not crazy. If it doesn't work for you then you are doing something wrong... That or I'm doing something terribly right.

Obviously fscanf was not written in PHP and thus works a lot faster than comparing each string manually with PHP.
Attached Files
File Type: zip filesfind.zip (3.3 KB, 12 views)
__________________
Dingo Web Systems > http://www.dingocode.com
My Website > http://www.evanbot.com
ETbyrne is offline  
Reply With Quote