Move BufferGetBlockNumber() out of heap_page_is_all_visible()'s inner loop.
authorAndres Freund <andres@anarazel.de>
Fri, 14 Nov 2014 16:04:44 +0000 (17:04 +0100)
committerAndres Freund <andres@anarazel.de>
Fri, 14 Nov 2014 16:04:44 +0000 (17:04 +0100)
commit0c5af0a537a2d6320eb8ef7f401401aa1f47b79e
tree0a3f4a89a1b3439641ee4c5cd636ac420afd0d8d
parent6c878edc1df9d4d9ad7ed4a7e1c34c0bf0f622b9
Move BufferGetBlockNumber() out of heap_page_is_all_visible()'s inner loop.

In some workloads BufferGetBlockNumber() shows up in profiles due to
the sheer number of calls to it (and because it causes cache
misses). The compiler can't move it out of the loop because it's a
full extern function call...
src/backend/commands/vacuumlazy.c