Re: [PATCH] Replace a long chain of if's in eval_const_expressions_mutator by a switch()
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org
Date: 2011-11-18T21:14:22Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.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