GNU bug report logs - #7089
23.2; slow ansi-color-apply

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Thu, 23 Sep 2010 09:14:02 UTC

Severity: normal

Found in version 23.2

Done: Leo <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #25 received at 7089-done <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 7089-done <at> debbugs.gnu.org
Subject: Re: bug#7089: 23.2; slow ansi-color-apply
Date: Thu, 25 Nov 2010 14:30:54 +0000
[Message part 1 (text/plain, inline)]
On 2010-10-31 19:10 +0000, Stefan Monnier wrote:
>> Do you know for sure string-match is slower (more CPU intensive) than
>> re-search-forward?
>
> They should be largely equivalent.  The difference between the two codes
> might be due to replace-match and substring.  I.e. the original
> ansi-color-apply should be at least as efficient as your code (if not
> more) in the case where there are no SGR escape sequences.
>
>
>         Stefan

I was setting out to profile the two versions of the function and
unfortunately I was not able to see the CPU shootup mentioned in the
first message. My result shows my version of ansi-color-apply is almost
twice as slow as the original one. (The code and data used for profiling
are attached.)

So please ignore this bug report.

Leo

[ansi-color-test.el (application/emacs-lisp, attachment)]
[ansi-test.txt (text/plain, attachment)]

This bug report was last modified 14 years and 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.