|
From: | Stefan Monnier |
Subject: | Re: Most used words in current buffer |
Date: | Sat, 21 Jul 2018 16:54:56 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> (or (eq char 9) (eq char 10) (eq char 13)) (eq char 32)) Aka (memq char '(?\t ?\n ?\r ?\s)) > (cl-loop with word = nil [...] > (forward-char))) This time you do the word-parsing char-by-char in Elisp. I'd expect you'll get better performance with things like `forward-word` or (re-search-forward "\\<.*?\\>" nil t) so that the Elisp loop operates word-by-word rather than having to look at each and every character. Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |