RE: [PHP-DEV] messing with branch prediction

2006-06-20 Thread Derick Rethans
On Wed, 21 Jun 2006, Zeev Suraski wrote: > Well, as I said I think it actually makes the code more readable, by hinting > you what you can ignore if you're running through the 'common case' (i.e., > even if this macro was a no-op). Diving into a big block of code is easier if > you can ignore par

RE: [PHP-DEV] messing with branch prediction

2006-06-20 Thread Zeev Suraski
: Zeev Suraski [mailto:[EMAIL PROTECTED] >Sent: Tuesday, June 20, 2006 7:17 AM >To: Andi Gutmans >Cc: 'Nuno Lopes'; 'PHPdev' >Subject: RE: [PHP-DEV] messing with branch prediction > >I still don't see how it can hurt, and even if it doesn't do >

RE: [PHP-DEV] messing with branch prediction

2006-06-20 Thread Andi Gutmans
Comments bellow: >-Original Message- > >First, let me thank you all that reviewed the patch. >When I first sent the patch to the list I didn't meant I >wanted it to be integrated with the main php sources. At least >before running some benchmarks and double-checking it. That >patch was

RE: [PHP-DEV] messing with branch prediction

2006-06-20 Thread Andi Gutmans
2006 7:17 AM >To: Andi Gutmans >Cc: 'Nuno Lopes'; 'PHPdev' >Subject: RE: [PHP-DEV] messing with branch prediction > >I still don't see how it can hurt, and even if it doesn't do >anything performance wise, it adds clarity to the code. > >Zeev >

Re: [PHP-DEV] messing with branch prediction

2006-06-20 Thread Nuno Lopes
I think it's a nice idea but I doubt it's very useful at this point. It doesn't seem to significantly affect performance, which is inline with some tests that we have done in the past, where it's really the hardware management of branch prediction and cache size which affect this. I doubt that m

RE: [PHP-DEV] messing with branch prediction

2006-06-20 Thread Zeev Suraski
IL PROTECTED] >Sent: Monday, June 19, 2006 12:46 AM >To: Nuno Lopes >Cc: PHPdev >Subject: Re: [PHP-DEV] messing with branch prediction > >Definitely looks nice. I actually like how it makes the code >more readable hinting which branches are rare. > >Zeev > >At 16:4

RE: [PHP-DEV] messing with branch prediction

2006-06-20 Thread Sascha Schumann
> Instead of guessing branch probabilities, why not measure them? Or, simply tell the compiler what you expect. Sometimes, GCC predicts incorrectly - if-branches are usually assumed _not_ to be executed. if (expect_true(x)) { foo(); } with.. #ifdef HAVE_BUILTIN_

RE: [PHP-DEV] messing with branch prediction

2006-06-19 Thread Leon Matthews
> Andi Gutmans wrote: > I think it's a nice idea but I doubt it's very useful at this point. It > doesn't seem to significantly affect performance, which is ... I concur. Instead of guessing branch probabilities, why not measure them? http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Optimize-Options

RE: [PHP-DEV] messing with branch prediction

2006-06-19 Thread Andi Gutmans
ms that the hardware is playing pretty nice with us. >-Original Message- >From: Zeev Suraski [mailto:[EMAIL PROTECTED] >Sent: Monday, June 19, 2006 12:46 AM >To: Nuno Lopes >Cc: PHPdev >Subject: Re: [PHP-DEV] messing with branch prediction > >Definitely looks

Re: [PHP-DEV] messing with branch prediction

2006-06-19 Thread Zeev Suraski
Definitely looks nice. I actually like how it makes the code more readable hinting which branches are rare. Zeev At 16:49 18/06/2006, Nuno Lopes wrote: Hello, Yesterday I was playing with branch prediction in the Zend VM executor. Although I didn't have any noticeable performance improveme

Re: [PHP-DEV] messing with branch prediction

2006-06-18 Thread Ilia Alshanetsky
Looks like an interesting patch, if it does not cost us any performance and only offers either no gain or a small gain I'd say it would be worth inclusion. Perhaps branch prediction will work better with newer versions of gcc like 4.0 or 4.1 On 18-Jun-06, at 9:49 AM, Nuno Lopes wrote: He

[PHP-DEV] messing with branch prediction

2006-06-18 Thread Nuno Lopes
Hello, Yesterday I was playing with branch prediction in the Zend VM executor. Although I didn't have any noticeable performance improvement within the bench.php script, I've put the patch on-line, because someone else might want to mess with it too :) (but with care..) patch: http://mega.is