Re: Review of Refactoring code for sync node detection

Поиск
Список
Период
Сортировка
Искать
От
Jim Nasby
Тема
Re: Review of Refactoring code for sync node detection
Дата
Msg-id
5452B4BB.8020704@BlueTreble.com
Ответ на
Список
Дерево обсуждения
Review of Refactoring code for sync node detection Jim Nasby <jim@nasby.net>
Re: Review of Refactoring code for sync node detection Michael Paquier <michael.paquier@gmail.com>
Re: Review of Refactoring code for sync node detection Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Review of Refactoring code for sync node detection Michael Paquier <michael.paquier@gmail.com>
Re: Review of Refactoring code for sync node detection Simon Riggs <simon@2ndQuadrant.com>
Re: Review of Refactoring code for sync node detection Michael Paquier <michael.paquier@gmail.com>
Re: Review of Refactoring code for sync node detection Simon Riggs <simon@2ndQuadrant.com>
Re: Review of Refactoring code for sync node detection Michael Paquier <michael.paquier@gmail.com>
Re: Review of Refactoring code for sync node detection Michael Paquier <michael.paquier@gmail.com>
Re: Review of Refactoring code for sync node detection Fujii Masao <masao.fujii@gmail.com>
Re: Review of Refactoring code for sync node detection Michael Paquier <michael.paquier@gmail.com>
Re: Review of Refactoring code for sync node detection Simon Riggs <simon@2ndQuadrant.com>
Re: Review of Refactoring code for sync node detection Michael Paquier <michael.paquier@gmail.com>
Re: Review of Refactoring code for sync node detection Heikki Linnakangas <hlinnakangas@vmware.com>
Re: Review of Refactoring code for sync node detection Michael Paquier <michael.paquier@gmail.com>
Re: Review of Refactoring code for sync node detection Heikki Linnakangas <hlinnakangas@vmware.com>
Re: Review of Refactoring code for sync node detection Michael Paquier <michael.paquier@gmail.com>
On 10/30/14, 8:05 AM, Michael Paquier wrote:
>> This switches from using a single if() with multiple conditions &&'d
>> together to a bunch of if() continue's. I don't know if those will perform
>> the same, and AFAIK this is pretty performance critical.
> Well, we could still use the old notation with a single if(). That's
> not much complicated to change.

I actually prefer the multiple if's; it reads a LOT cleaner. I don't know what the compiler will do with it though.

If we stick with this version I'd argue it makes more sense to just stick the sync_node = and priority = statements into the if block and ditch the continue. 
-- 
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com


В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Robert Haas
Дата:
FAQ