Re: -exec test (use which to only find test once)

2015-03-25 Thread Dale R. Worley
Peng Yu writes: > I find that "-exec test ..." can be slower than "-exec $(which test) > ...". Is possible that `find` internally use "which", so that users > don't need to explicitly call it? It's possible, I suppose, but the semantics of -exec can be changed by turning the program name into a s

Re: -exec test (use which to only find test once)

2015-03-25 Thread Bernhard Voelker
On 03/26/2015 01:40 AM, Peng Yu wrote: > For my case, it is about 10% time difference. This is quite much - well, a real program other than test would probably do much more processing and therefore making the overhead for searching the executable in PATH make smaller in percentage. How does your $

Re: -exec test (use which to only find test once)

2015-03-25 Thread Peng Yu
For my case, it is about 10% time difference. On Wednesday, March 25, 2015, Bernhard Voelker wrote: > On 03/25/2015 11:39 PM, Peng Yu wrote: > > I find that "-exec test ..." can be slower than "-exec $(which test) > > ...". Is possible that `find` internally use "which", so that users > > don't

Re: -exec test (use which to only find test once)

2015-03-25 Thread Bernhard Voelker
On 03/25/2015 11:39 PM, Peng Yu wrote: > I find that "-exec test ..." can be slower than "-exec $(which test) > ...". Is possible that `find` internally use "which", so that users > don't need to explicitly call it? Thanks. How much slower is it for you? In my test case, the findutils repository

-exec test (use which to only find test once)

2015-03-25 Thread Peng Yu
Hi, I find that "-exec test ..." can be slower than "-exec $(which test) ...". Is possible that `find` internally use "which", so that users don't need to explicitly call it? Thanks. -- Regards, Peng