You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "stephanlachnit (via GitHub)" <gi...@apache.org> on 2025/11/17 10:28:33 UTC
Re: [PR] AVRO-4134: [C++] Allocate std::vector block by block when decoding [avro]
stephanlachnit commented on PR #3546:
URL: https://github.com/apache/avro/pull/3546#issuecomment-3541016813
Have you actually tested if this is faster? Calling `reserve` in a loop looks to me it could actually make it slower since it since it reserves exactly, leading to a potential reallocation every loop iteration, while push_back will exponentially over-reserve, leading to potentially less reallocation. See https://www.youtube.com/watch?v=algDLvbl1YY for an in-depth video about this.
--
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: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org