[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24012: 25.0.95; forward-comment backwards takes O(n^2)
From: |
Eli Zaretskii |
Subject: |
bug#24012: 25.0.95; forward-comment backwards takes O(n^2) |
Date: |
Sun, 17 Jul 2016 15:12:01 +0300 |
> From: Leo Liu <sdl.web@gmail.com>
> Date: Sun, 17 Jul 2016 19:04:18 +0800
>
> 1. Use the attached file as an example, open it in emacs in ruby-mode
> 2. Move point to end of buffer and eval (forward-comment (- (point)))
>
> The last step takes about 0.25 seconds on my MacBook 3 GHz Intel Core
> i7. If you double the lines of comments, the time increase by 4 folds.
>
> Any idea why forward-comment backwards is so slow?
Because search functions cannot really search backwards?
bug#24012: 25.0.95; forward-comment backwards takes O(n^2), Andreas Röhler, 2016/07/17