-
-
Notifications
You must be signed in to change notification settings - Fork 307
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 getter-fn and tuple-key-fn
getter-fn: We can dispatch to a slightly more efficient getter based on the type of the index, and eliminate an instance check. If the index is a number, we can dispatch via nth or array, and cast to a primitive in advance. If it is not a number, we know the target can't be an array. tuple-key-fn: We can completely eliminate mapping getter-fn over attributes First, we can check the count of common attributes _before_ mapping, thus short circuiting the non-composite key earlier. Otherwise, we can build the key while iterating on arrays, significantly faster.
- Loading branch information
Showing
1 changed file
with
74 additions
and
42 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