Todd Lipcon has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/15503 )

Change subject: client: micro-optimize result batch cell getters by outlining 
cold path
......................................................................

client: micro-optimize result batch cell getters by outlining cold path

This improves performance in a couple ways:

- by outlining the Substitute call and Status construction, the
  templated Get<TypeTraits> function becomes much smaller. This makes it
  get inlined into the GetInt8(), GetInt32(), etc outer functions. So,
  every call into those functions is just a single call instead of two
  calls in short succession. This makes branch prediction easier.

- The addition of PREDICT_FALSE means the common path is now the
  "straight line" path which means that a tight loop calling these
  functions may be able to entirely fit within the micro-op cache, etc.
  Details here are a bit black magic but it's generally considered good
  hygiene for short loops to minimize the code footprint.

- The outlining of the call also means the stack frame size is a bit
  smaller. The new code path has three "push" and "pop" instructions in
  the function intro/outro whereas the old one had 6.

This improved TSBS perf about 10% for one of the workloads.

Change-Id: I5838576b3e18cbe8e093bf1e9ce6418ce922de63
Reviewed-on: http://gerrit.cloudera.org:8080/15503
Reviewed-by: Alexey Serbin <[email protected]>
Tested-by: Todd Lipcon <[email protected]>
---
M src/kudu/client/scan_batch.cc
1 file changed, 11 insertions(+), 6 deletions(-)

Approvals:
  Alexey Serbin: Looks good to me, approved
  Todd Lipcon: Verified

--
To view, visit http://gerrit.cloudera.org:8080/15503
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I5838576b3e18cbe8e093bf1e9ce6418ce922de63
Gerrit-Change-Number: 15503
Gerrit-PatchSet: 3
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <[email protected]>

Reply via email to