-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize and simplify
haskell-ds-create-imenu-index
with hashtable
The function has implemented a poor man's hash table by manually enlisting keys and then using `cl-case` on values. Just replace this with a hashtable and thus simplify the code considerably. This makes it faster as well because the `cl-case + setq` is O(n) whereas `puthash` is O(1). The output of the function was tested on Pandoc's `Writers/Powerpoint/Output.hs` file of 2841 lines and comparing the hashsum of the output before the changes and after. It didn't change. The commit is also basically a backport of a similar change on purescript-mode that has been forked form haskell-mode at some point: purescript-emacs/purescript-mode#27
- Loading branch information
Showing
1 changed file
with
14 additions
and
41 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