Dumb Micro-Optimization - Mailing list pgsql-hackers

From PFC
Subject Dumb Micro-Optimization
Date
Msg-id op.t9d63xejcigqcu@apollo13.peufeu.com
Whole thread Raw
List pgsql-hackers
* Dumb Optimization #1:

- Add executorFunc function pointer to struct PlanState
- in ExecProcNode.c -> ExecProcNode() :- upon first execution, set executorFunc to the function corresponding to  
node type- next calls use function pointer

Effect : removes a switch (nodeTag(node)) which otherwise executes for  
every tuple returned by every node
Gain :
- 4% CPU time on SELECT sum(an integer column) FROM a table of one million  
rows
- nil on selects returning few rows obviously



pgsql-hackers by date:

Previous
From: Dave Cramer
Date:
Subject: Re: [JDBC] Re: How embarrassing: optimization of a one-shot query doesn't work
Next
From: Heikki Linnakangas
Date:
Subject: Re: Free Space Map data structure