emacs-devel
[Top][All Lists]
Advanced

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

Re: Case mapping of sharp s


From: Stefan Monnier
Subject: Re: Case mapping of sharp s
Date: Thu, 19 Nov 2009 21:11:15 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

> Also how can it happen that a C function varies between 4 and 90
> seconds for the same action.

I have no explanation for that.

>> As for the general slowdown, it may also be due to having to parse the
>> char (encoded in utf-8) and then look it up in the corresponding char table
>> (a tree of arrays).
> From what I saw the simple_search() calls out to lisp for every
> single buffer-byte

I really don't think that's the case.

> whereas boyer_moore() just translates it with a prefabricated C table.

> However if simple_search just would prepare the first char of
> the pattern in both lower and uppercase version readily for
> comparison it could be as fast as bm I guess (for a pattern
> length of less than 4 that is)

There may be more than 2 chars in the same "case-fold"
equivalence class, so it may be a bit more difficult in general, but
you're probably right that it can be made faster.


        Stefan




reply via email to

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