forked from facebookincubator/velox
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize dictionary memoization in favor of memory (facebookincubator…
…#7226) Summary: Pull Request resolved: facebookincubator#7226 We recently noticed that this optimization in expression evaluation eagerly holds onto the base of the dictionary vector and the cached results in anticipation that the next input vector might have the same base. This additional memory can be held up unnecessarily in cases where the input cannot take advantage of it. Therefore, with this change we ensure that we only cache results if we encounter the same base at least twice. Additionally, a strong reference to the base is only held once results are cached. This is to ensure that the vector held is not modified and re-used in-place. Reviewed By: kagamiori Differential Revision: D50622335 fbshipit-source-id: 684b94c6945585027806fe317c15fb1439dd7c9b
- Loading branch information
1 parent
26a0d2a
commit 5ff9cee
Showing
4 changed files
with
143 additions
and
80 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
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