[Top][All Lists]

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

Re: [Bug-zile] Incremental search is dog slow in moderately-sized files

From: Gary V. Vaughan
Subject: Re: [Bug-zile] Incremental search is dog slow in moderately-sized files
Date: Sat, 18 Jan 2014 18:26:54 +1300

Hi Reuben,

On Jan 18, 2014, at 4:03 PM, Gary V. Vaughan <address@hidden> wrote:
> [[...]] the only thing I can think of is to add bi-directional char buffer 
> searches into alien itself, with a fallback memrchr function incase the host 
> libc lacks one.

This speeds things up drastically for me - though most likely still an order of 
magnitude slower than memrchr in libc:

  local function memrchr (buf, ch, o)
    local c = string.byte (ch)
    for i = o, 1, -1 do
      if buf[i] == c then return i end

I'll push that change presently as it's a definite improvement.  What I'd 
really like is a way to check whether alien.default.memrchr will work or not; 
but even wrapped in pcall() it crashes out before returning.  Is there a way to 
check for a symbol in alien?

Gary V. Vaughan (gary AT gnu DOT org)

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

reply via email to

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