|Subject:||Re: [Bug-zile] Incremental search is dog slow in moderately-sized files|
|Date:||Sat, 18 Jan 2014 08:53:17 +0000|
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?
|[Prev in Thread]||Current Thread||[Next in Thread]|