[Toybox] More find cleanup
Rob Landley
rob at landley.net
Sun Apr 21 21:01:08 PDT 2013
On 04/21/2013 03:46:19 PM, Felix Janda wrote:
> Is this no longer relevant because of the following?
Yeah, I was wrong.
> > > The command line parsing
> > > is however now less efficient since after an argument has been
> tested
> > > for equality with different strings like "-mtime" and the
> > > corresponding
> > > type (CHECK_MTIME) has been saved, the saved integer has again to
> be
> > > checked for equality with stuff to find out what further command
> line
> > > parsing is necessary.
> >
> > An integer check is trivial. String comparisons do an order of
> > magnitude more work and evict cache lines in the process. On
> processors
> > with multiple execution units (on x86 that's everything since the
> > original pentium) an extra integer operation may even use an
> otherwise
> > idle execution unit so literally take no time at all. (Branches can
> be
> > expensive, it depends.)
>
> Ok, I thought more about the extra jumping around than about the
> integer
> checks. But actually it should only 2 additional jumps (jumping to the
> case label and jumping out of the switch with "break").
Disk access should totally dominate here. Even if it's cached, the
syscalls to fetch the next directory entries should dominate. If it
doesn't, then worry about it.
> > Instead, I'm kind of annoyed about it. Luckily, I downloaded the old
> > one.
> >
> > (Version control, guys. It's a thing.)
>
> Isn't there a CHANGE HISTORY for each command? Is for example the
> -path
> primary new for find? Not that this diff format is very handy.
Presumably if I dig far enough, I can find out what they did. First,
I'm trying to figure out if I care what they did.
Rob
1366603268.0
More information about the Toybox
mailing list