slocate: All the makings of an intercontinental grudge match

I could be left alone in a windowless room with only a bare light bulb and find to search out the lost files on my computer, and I’d be fine with that.

Then again slocate, and its evil stepsisters in the mlocate coven, might give find a run for its money.

kmandla@6m47421: ~$ time find /usr/lib -iname *pcmcia*

real	0m0.400s
user	0m0.120s
sys	0m0.090s

And the upstart?

kmandla@6m47421: ~$ time slocate -qi pcmcia | grep /usr/lib

real	0m0.303s
user	0m0.240s
sys	0m0.000s

Uh-oh. This could shape up to be the match of the century. 😯

Loyalists will insist that slocate is cheating, because it doesn’t really search so much as skim through its database and pick out the stuff you want.

Bolsheviks will counter with reduced time searching, less disk thrashing and adherence to the Second Law of Robotics.

For my own part, I’m not a big fan of databases and meta-information on my system. I appreciate s/m/locate‘s speed and conservation of energy, but my allegiance lies with find.

And really, I know where everything is on my computer. I don’t go searching for stuff that often. 🙄

So I say … down with the revolution! 😈

1 thought on “slocate: All the makings of an intercontinental grudge match

  1. Pingback: Links 29/4/2014: New Debian, New Award for Torvalds | Techrights

Comments are closed.