[SERVER-60116] Fix Excessive Pointer Arithmetics in the Buffer Builder Created: 21/Sep/21  Updated: 29/Oct/23  Resolved: 26/Oct/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.2.0

Type: Improvement Priority: Major - P3
Reporter: Mohammad Dashti (Inactive) Assignee: Mohammad Dashti (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-60137 Improve Buffer Allocation for Common ... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

There is some complexity with the pooled buffer alloc, since it does not provide a pointer eagerly. redbeard0531 hacked it in this patch and saw a noticeable performance improvement by eagerly doing the pointer arithmetics. On this patch, grow() was written to be especially friendly to how compilers like to generate code.



 Comments   
Comment by Githook User [ 26/Oct/21 ]

Author:

{'name': 'Mohammad Dashti', 'email': 'mdashti@gmail.com', 'username': 'mdashti'}

Message: SERVER-60116 Used a 3-pointer implementation of BasicBufBuilder to optimize for common usage.

Co-authored-by: Mathias Stearn <redbeard0531@gmail.com>
Branch: master
https://github.com/mongodb/mongo/commit/4bc5be3bad41c21ee729dd700c64b22c1bdb1c12

Generated at Thu Feb 08 05:49:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.