-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
topdown: Fix bug in set/array comprehension indexing
In 00a71ef we added support for comprehension indexing, however, there was a bug in the implementation for sets and objects: the child query was closing over the parent--we only had test coverage against arrays so this went uncaught. This meant that sets and objects would still see O(N^2) runtime. This commit resolves the issue and includes a new instrumentation counter that should help identify this kind of issue (if the skip and miss count differs, something is wrong.) Rather than erroring in this case, we just lazily compute the comprehension. Signed-off-by: Torin Sandall <torinsandall@gmail.com>
- Loading branch information
Showing
3 changed files
with
73 additions
and
26 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