valerybokov commented on PR #317:
URL: https://github.com/apache/pdfbox/pull/317#issuecomment-3506819317

   > there are more entries added after that loop, shouldn't it be +3 ? +1 
because of <=, +2 because at most 2 entries are added.
   
   According to current benchmarks, the list's size is always equal to its 
capacity. And yes, we're adding one element, but it could be two. There's no 
benchmark that uses code that adds two elements to a list. So, we can write 3 
instead of 2. If we write 3, sometimes the list's capacity will be larger than 
its size (more memory). Or we can use 2, which will be slightly slower in some 
cases because we need to increase the capacity.
   
   Apparently, it's a minor issue. If necessary, I'll give it a 3.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to