A couple of tiny performance hacks in _bt_step(). Remove PageIsEmpty

Tom Lane <tgl@sss.pgh.pa.us>

Commit: f1b059af12673abf93ba13594799732bac83ed01
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2005-12-07T18:03:48Z
Releases: 8.2.0
A couple of tiny performance hacks in _bt_step().  Remove PageIsEmpty
checks, which were once needed because PageGetMaxOffsetNumber would
fail on empty pages, but are now just redundant.  Also, don't set up
local variables that aren't needed in the fast path --- most of the
time, we only need to advance offnum and not step across a page boundary.
Motivated by noticing _bt_step at the top of OProfile profile for a
pgbench run.

Files

PathChange+/−
src/backend/access/nbtree/nbtsearch.c modified +10 −8