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.
Showing
想要评论请 注册 或 登录