Skip site navigation (1) Skip section navigation (2)

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: 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-18 21:14:22
Message-ID: 25027.1321650862@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Andres Freund <andres(at)anarazel(dot)de> writes:
> For unknown reasons the function used non chained ifs for every handled
> nodeType.
> 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.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Peter GeogheganDate: 2011-11-18 21:38:18
Subject: Re: Inlining comparators as a performance optimisation
Previous:From: Andres FreundDate: 2011-11-18 21:13:22
Subject: EXPLAIN (plan off, rewrite off) for benchmarking

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group