Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Filename generation: sorting by inode number



[Sorry for the long context / short reply below]

On Apr 28,  5:19pm, Vincent Lefevre wrote:
}
} $ sudo drop-caches && time grep -q zzz 1000*(oN)
} grep -q zzz 1000*(oN)  0.03s user 0.32s system 0% cpu 40.726 total
} 
} $ sudo drop-caches && time grep -q zzz 1000*(noe:'zstat -L -A REPLY +inode $REPLY:')
} grep -q zzz 1000*(noe:'zstat -L -A REPLY +inode $REPLY:')  0.06s user 0.14s system 12% cpu 1.590 total
} 
} but "oc" is slower (confirmed by 3 tests each), even though the files
} have been created with no inode change, e.g.:
} 
} $ sudo drop-caches && time grep -q zzz 1000*(oc)
} grep -q zzz 1000*(oc)  0.01s user 0.19s system 7% cpu 2.589 total
} 
} The probable cause is the low ctime resolution (1 second?).

Looks like (oc) is significantly faster than (oN), though, even though it
is slower than (o+byinode).  So it may be a reasonable compromise.



Messages sorted by: Reverse Date, Date, Thread, Author