-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve performance of _determineActualTypes
The current algorithm is inefficient for unary and binary types. Given an array containing 1000 elements, for example, we first determine the types of each element, resulting in an array of 1000 arrays of types. We then find the intersection of these "sets". This commit introduces a different approach: for each element, we refine the set of types of which all previous elements are members rather than filtering the whole environment each time. This is significantly more efficient for large arrays.
- Loading branch information
1 parent
8835e65
commit 2f94dbc
Showing
2 changed files
with
137 additions
and
106 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