[Top][All Lists]

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

Re: __builtin_expect used in regex

From: arnold
Subject: Re: __builtin_expect used in regex
Date: Wed, 17 Oct 2018 12:42:20 -0600
User-agent: Heirloom mailx 12.4 7/29/08


Paul Eggert <address@hidden> wrote:

> On 10/1/18 11:31 AM, address@hidden wrote:
> > Those changes look really excessive to me. I prefer to not have to
> > keep including more and more files from gnulib just to compile regex
> > or dfa.
> Sorry, I didn't read your message (I had misfiled it) until just now, 


> after I propagated the patch into glibc. So now I will have to go into 
> repair mode....

Is the patch also in gnulib?

> I would rather minimize the difference from glibc. Is this the only 
> place where the Gawk regex code departs from the Gnulib copy? If so, 
> let's try to come up with a way to keep the source identical, if only by 
> using "#ifdef _LIBC" or "#ifdef GAWK" or whatever.

In my custom.h, I have added

        /* This keeps regex happy on non-GCC compilers */
        #ifndef __GNUC__
        #ifndef __builtin_expect
        #define __builtin_expect(expr, val) (expr)

I did not actually change the regex files.

> > (As a side point, does all the __builtin_expect / __glibc_unlikely
> > stuff *really* make that much difference?  It sure clutters up
> > the code unmercifully.)
> I agree. I don't think they make much performance difference nowadays. I 
> plan to time them and see if we're right; if so, let's get rid of them 
> (in glibc regex, Gnulib, and in Gawk).

So, let's wait until the results of all this. Once you update regex
in Gnulib I will sync with it.



reply via email to

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