Re: [PATCH 2/7] Add 'likely' and 'unlikely' macros

2015-05-15 Thread Peter Harris
On 2015-05-15 01:48, Alan Coopersmith wrote: Speaking of which, something I've wondered about for a while, but never had time to test, is if telling the server to optimize for valid requests would make a difference, such as: #define REQUEST_AT_LEAST_SIZE(req) \ -if ((sizeof(req) 2)

Re: [PATCH 2/7] Add 'likely' and 'unlikely' macros

2015-05-15 Thread Alan Coopersmith
On 05/15/15 03:34 PM, Peter Harris wrote: On 2015-05-15 01:48, Alan Coopersmith wrote: Speaking of which, something I've wondered about for a while, but never had time to test, is if telling the server to optimize for valid requests would make a difference, such as: #define

Re: [PATCH 2/7] Add 'likely' and 'unlikely' macros

2015-05-14 Thread Alan Coopersmith
On 05/12/15 11:02 PM, Keith Packard wrote: walter harms wha...@bfs.de writes: Just for my curiosity .. is there any benchmark that shows that this actually improves something Yeah, I was measuring the new text code during development and saw some (tiny) improvements -- it's got a ton of

Re: [PATCH 2/7] Add 'likely' and 'unlikely' macros

2015-05-13 Thread Keith Packard
walter harms wha...@bfs.de writes: Just for my curiosity .. is there any benchmark that shows that this actually improves something Yeah, I was measuring the new text code during development and saw some (tiny) improvements -- it's got a ton of branches in an inner loop loading glyphs pointers

Re: [PATCH 2/7] Add 'likely' and 'unlikely' macros

2015-05-12 Thread Kenneth Graunke
On Monday, May 11, 2015 09:23:53 PM Keith Packard wrote: These two macros provide hints to the compiler about common code paths to help it optimize a bit better. Signed-off-by: Keith Packard kei...@keithp.com --- include/misc.h | 8 1 file changed, 8 insertions(+) diff --git

Re: [PATCH 2/7] Add 'likely' and 'unlikely' macros

2015-05-12 Thread Julien Cristau
On Mon, May 11, 2015 at 21:23:53 -0700, Keith Packard wrote: These two macros provide hints to the compiler about common code paths to help it optimize a bit better. Signed-off-by: Keith Packard kei...@keithp.com --- include/misc.h | 8 1 file changed, 8 insertions(+) diff

Re: [PATCH 2/7] Add 'likely' and 'unlikely' macros

2015-05-12 Thread walter harms
Just for my curiosity .. is there any benchmark that shows that this actually improves something re, wh Am 12.05.2015 06:23, schrieb Keith Packard: These two macros provide hints to the compiler about common code paths to help it optimize a bit better. Signed-off-by: Keith Packard

Re: [PATCH 2/7] Add 'likely' and 'unlikely' macros

2015-05-12 Thread Keith Packard
Julien Cristau jcris...@debian.org writes: X11/Xfuncproto.h defines _X_LIKELY and _X_UNLIKELY, are those not good enough? Yes, those will do just fine; I completely missed them. -- -keith signature.asc Description: PGP signature ___

[PATCH 2/7] Add 'likely' and 'unlikely' macros

2015-05-11 Thread Keith Packard
These two macros provide hints to the compiler about common code paths to help it optimize a bit better. Signed-off-by: Keith Packard kei...@keithp.com --- include/misc.h | 8 1 file changed, 8 insertions(+) diff --git a/include/misc.h b/include/misc.h index 9b1c03a..74889f5 100644 ---