Re: [PATCH] Replace a long chain of if's in eval_const_expressions_mutator by a switch()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Replace a long chain of if's in eval_const_expressions_mutator by a switch()
Date: 2011-11-28 19:23:58
Message-ID: 20898.1322508238@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> On Friday, November 18, 2011 10:14:22 PM Tom Lane wrote:
>> Andres Freund <andres(at)anarazel(dot)de> writes:
>>> Replacing the if chain with if; else if; ... resulted in a small
>>> speedup. Replacing it with a switch() in a bigger one.

>> Cool, but this patch is impossible to validate by eye. Could you
>> resubmit a version that doesn't reindent unchanged code? Leave it
>> for pgindent to clean that up later.

> Sure. It was just to confusing reading the code without reindenting.
> Btw, I found git diff/show/blame -w very useful to view reindent code.

Applied, thanks. Bruce, would you mind running pgindent on
just src/backend/optimizer/util/clauses.c ? That seems safer than
reindenting manually.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gurjeet Singh 2011-11-28 19:55:28 Re: Avoiding repeated snapshot computation
Previous Message Julien Tachoires 2011-11-28 18:32:15 Re: patch : Allow toast tables to be moved to a different tablespace