]> git.eshelyaron.com Git - emacs.git/commit
editorconfig-fnmatch.el: Eliminate O(N^2) complexity
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 18 Jun 2024 21:52:45 +0000 (17:52 -0400)
committerEshel Yaron <me@eshelyaron.com>
Fri, 21 Jun 2024 19:00:20 +0000 (21:00 +0200)
commit59fa0d2b8c0843cdc0125f152c51f418c2f44820
tree02217ac3475e09413f3b5c7ec32dff363f15dfce
parentc42c599e3513f7225df3410b224e9f6955e0fd3c
editorconfig-fnmatch.el: Eliminate O(N^2) complexity

* lisp/editorconfig-fnmatch.el (editorconfig-fnmatch--do-translate):
Accumulate partial results in reverse order to pay a single O(N)
reverse at the end instead of N times O(N) concatenations.

(cherry picked from commit ee309f77543ac53e407a4b3ca7001bc920099d1b)
lisp/editorconfig-fnmatch.el