On 11/22/19 8:00 AM, Balázs Vinarz wrote:
Would you mind change the default optimize level on the make configuration? Did somebody ever measured the benefits using different GCC optimalization levels?
Lots of measurements have been done. They often disagree. Even if grep changed the default optimization level (which I'm not sure is a good idea), distros like Ubuntu often override the default and if so, changes to the default wouldn't help you.
I know that this is a special use case, but the improvement is huge. I'm looking forward for your feedback.
It sounds like you're using grep to do set subtraction; is this a common-enough usage to be worth special-casing grep for? (One could argue that it's easy enough to do set subtraction with Awk or Python or whatever....) If we do want to tune grep for set-like operations, that suggests doing some surgery to its internals rather than merely fiddling with -O flags.