-
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.
Decrease startup-time by avoiding iteration over maps
This commit makes adding, removing and finding key maps an O(1) operation instead of O(n), where n is the number of pre-existing maps. In my testing, averaged over 100 iterations, this reduces the time spent initializing NERDTree at Vim startup from ~73ms to ~9.7ms. That's with only the default included key maps.
- Loading branch information
Showing
1 changed file
with
16 additions
and
22 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