Hi Paul,

> > +   If you want the use of this macro to improve, not deteriorate,
> > +   performance, R should not contain function calls except to functions
> > +   that are declared 'inline __attribute__((__always_inline__))'.  */
> 
> A reader of that might incorrectly conclude that using such functions will 
> always improve performance, compared to using functions not declared that way.

For functions not declared 'inline __attribute__((__always_inline__))', it
depends on the inlining heuristics of the compiler whether the 'assume (R)'
will be a performance improvement or the opposite.

> Also, given Pip Cet's misunderstanding it'd be helpful to add a word or two 
> about the intent of 'assume (R)'.
> 
> How about the attached patch?

That's a good compromise.

>  > -   evaluated.  Behavior is undefined if R is false.  */
>  > +   evaluated.  The behavior is undefined if R is false.
> 
> This is a nit, but to my ears the shorter version is better

OK, fine.

Bruno


Reply via email to