Hi misi, > you almost convinced me with the disk time... > > but that is not true. Reading the same file with a command like grep, > takes 567msecs. > try > > time grep XXXXXXXXXXX ./all3.c #this will not find anything, but will > process all the file.. and no mmap is used!!!!! > the result is:
The problem with "the time it takes to read" in Unix is elusive. It depends on the number of real physical reads Unix has to do. If the data is already in the buffers, the performance is much better. Example (with a 27MB file I had not been using in advance): (aca) root /e/ita > time grep zxdfgghjjkk voci.txt real 0m1.342s user 0m0.028s sys 0m0.048s (aca) root /e/ita > time grep zxdfgghjjkk voci.txt real 0m0.093s user 0m0.040s sys 0m0.024s (aca) root /e/ita > time grep zxdfgghjjkk voci.txt real 0m0.088s user 0m0.028s sys 0m0.036s (aca) root /e/ita > time grep zxdfgghjjkk voci.txt real 0m0.082s user 0m0.032s sys 0m0.028s (aca) root /e/ita > time grep zxdfgghjjkk voci.txt real 0m0.062s user 0m0.016s sys 0m0.028s (aca) root /e/ita > time grep zxdfgghjjkk voci.txt real 0m0.055s user 0m0.024s sys 0m0.020s (aca) root /e/ita > time grep zxdfgghjjkk voci.txt real 0m0.077s user 0m0.024s sys 0m0.036s (aca) root /e/ita > time grep zxdfgghjjkk voci.txt real 0m0.049s user 0m0.020s sys 0m0.024s (aca) root /e/ita > ll voci.txt -rwxrwxr-x 1 root users 27338279 15 mag 2007 voci.txt I don't know in which conditions you performed your tests, but ideally you should reboot once per each test, and perform the test without having used the file in advance, in order to be sure that the Unix buffers are empty (of the tested file). Then a comparison can be safely used. Cheers, Antonio -- /||\ | Antonio Colombo / || \ | [EMAIL PROTECTED] / () \ | [EMAIL PROTECTED] (___||___) | [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
