bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23269: Multi-threaded operation, mbrtowc, and "untangle" script [was


From: Zev Weiss
Subject: bug#23269: Multi-threaded operation, mbrtowc, and "untangle" script [was Re: bug#23269...]
Date: Sun, 24 Apr 2016 19:18:22 -0500
User-agent: Mutt/1.5.24 (2015-08-30)

On Thu, Apr 21, 2016 at 07:43:29AM -0700, Paul Eggert wrote:
On 04/21/2016 02:55 AM, address@hidden wrote:
it
would be a very suprising change in behavior if output from multiple
files comes out interleaved, instead of in the order the files were
specified on the command line.

I presume that computation is interleaved but the output order is the same as before, unless the user specifies an option saying speed trumps predictability.


For what it's worth, the command-line flag added by my multithreading patch series as it currently stands is pretty much that (speed over predictability). In the interest of simplicity, it omits per-file output buffering and just outputs matching lines as they are found -- the non-determinism this introduces into its output is the reason it's left as an opt-in command-line flag and not on by default.

[Strictly speaking even in the default "single-threaded" mode it *is* in fact actually multi-threaded, but there's only one search thread, so output ordering is unaffected. In theory even this could allow a slight performance improvement by overlapping pattern-matching with directory traversal and prefetching in the master thread, but I'd guess it's probably negligible in most cases, and isn't really the goal of the patches.]


Zev Weiss






reply via email to

[Prev in Thread] Current Thread [Next in Thread]