help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Most used words in current buffer


From: Eric Abrahamsen
Subject: Re: Most used words in current buffer
Date: Sun, 22 Jul 2018 13:05:55 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Udyant Wig <udyantw@gmail.com> writes:

> On 07/22/2018 09:30 AM, Eric Abrahamsen wrote:
>> Actually I think alternating `forward-word' with `forward-to-word'
>> might do the exact same thing as alternating (skip-syntax-forward "w")
>> with (skip-syntax-forward "^w"), and might get you some
>> extra... stuff. Maybe worth benchmarking!
>
> I did.  I had to load the `misc' package to use `forward-to-word'.  A
> ten run timing session gave an average of 4.89 seconds on the 4.5 MB
> text file: more than twice as much time as the version of the code using
> `skip-syntax-forward'.

Wow, that's way worse than I would have guessed. `forward-word' does
much more than `skip-syntax-forward', (it lets you use
`find-word-boundary-function-table', for one thing) but I wouldn't have
thought it does *that* much more. I don't speak C though, so...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]