BIND 10 #536: Make OutputBuffer more lightweight
BIND 10 Development
do-not-reply at isc.org
Wed Jan 26 20:42:18 UTC 2011
#536: Make OutputBuffer more lightweight
-------------------------------------+-------------------------------------
Reporter: vorner | Owner: jinmei
Type: task | Status: new
Priority: major | Milestone: A-Team-
Component: DNSPacket API | Sprint-20110209
Sensitive: 0 | Keywords:
Add Hours to Ticket: 0 | Estimated Number of Hours: 0
Total Hours: 0 | Billable?: 1
| Internal?: 0
-------------------------------------+-------------------------------------
This is one of the performance related tasks.
The isc::dns::OutputBuffer::operator[] function takes 25% of our running
time. It is quite surprising, as a simple function like that should
inline. The task is to make it more friendly for inlining, which includes:
* The return value of the operator[] should be uint8_t instead of const
uint8_t &, because the single byte is smaller to copy/pass around than
actual pointer and saves overhead of taking the address and dereferencing
it.
* The data inside should be kept if something simpler than vector (as
this is the probable reason why it isn't inlined). An array should be
enough. It is more work to do in the modifying functions, and care must be
taken to correctly allocate/deallocate (and create a copy constructor, if
one is needed anywhere), but the possible performance gain should be
large.
--
Ticket URL: <https://bind10.isc.org/ticket/536>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list