bug-zile
[Top][All Lists]
Advanced

[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: Reuben Thomas
Subject: Re: [Bug-zile] Incremental search is dog slow in moderately-sized files
Date: Mon, 20 Jan 2014 00:56:42 +0000

On 19 January 2014 09:16, Gary V. Vaughan <address@hidden> wrote:

Which continues to work on my Mac (because it fails the have_memrchr check and uses the
fallback implementation), but blows up spectacularly on Travis:

I can't currently reproduce this because I seem to have a too old stdlib (35), which Zile's bootstrap doesn't complain about, or issue guidance on installing a newer copy of.
 
If you had time to try out those two revision on your Linux machine, and help me figure out how
I screwed up the alien memrchr wrapper in the latter, that would be awesome!

On closer inspection, one bit looks dodgy:

return function (buf, ch, o)
    local b = buf.buffer
    local prev = alien.default.memrchr (
      b:topointer (o), string.byte (ch), o - 1)
    return prev and b:tooffset (prev) or nil
  end

b:topointer (o) should just be b:topointer(): the pointer's to the start of the block of memory you're searching, not the start point of the search.

--
http://rrt.sc3d.org

reply via email to

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