-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reduces chunking allocations for wide relations
For most situations, when the number of elements to dispatch is below the default 100 elements, the slice with elements to dispatch was appropriately pre-allocated. However, when dispatching large number of elements, the silence will grow from 1 up to the number of chunks, causing wasteful allocations in the critical path. To simplify the logic, +1 is added to account for the situation the number of elements is less than the chunk size. For values above that it will cause one excess slice entry allocation, but seems like a reasonable tradeoff w.r.t extra annoying code to handle it.
- Loading branch information
1 parent
380da03
commit 1d46c13
Showing
2 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters