Tim Armstrong has posted comments on this change. ( http://gerrit.cloudera.org:8080/8145 )
Change subject: IMPALA-5988: optimise MemPool::TryAllocate() ...................................................................... Patch Set 3: (2 comments) http://gerrit.cloudera.org:8080/#/c/8145/3/be/src/runtime/mem-pool.h File be/src/runtime/mem-pool.h: http://gerrit.cloudera.org:8080/#/c/8145/3/be/src/runtime/mem-pool.h@122 PS3, Line 122: uint8_t* TryAllocateUnaligned(int64_t size) noexcept { > Change lgtm. Mind explaining the original motivation behind the 8-byte defa The default has been 8 byte aligned for as long as I'm aware. I added the alignment parameter because there was a case where we needed 16-byte alignment I think 8-byte alignment is a reasonable default and matches what malloc() does. There's sometimes a perf benefit (although it's pretty limited on recent Intel processors). It might make sense to use unaligned memory in some other cases but it'd probably need perf validation. http://gerrit.cloudera.org:8080/#/c/8145/3/be/src/runtime/mem-pool.h@123 PS3, Line 123: Allocate<true>(size, 1); > TryAllocateAligned(size, 1); This was somewhat deliberate - I wanted to force inlining into this function so that the alignment logic could be optimised out. Added a comment - lmk if that addresses the comment. -- To view, visit http://gerrit.cloudera.org:8080/8145 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I088012084fe535a67a3cd1103ced5a02027f961a Gerrit-Change-Number: 8145 Gerrit-PatchSet: 3 Gerrit-Owner: Tim Armstrong <[email protected]> Gerrit-Reviewer: Alex Behm <[email protected]> Gerrit-Reviewer: Dan Hecht <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-Comment-Date: Wed, 04 Oct 2017 19:41:58 +0000 Gerrit-HasComments: Yes
