[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaJIT 2.0 and external C libraries
- From: Alexander Nasonov <alnsn@...>
- Date: Thu, 25 Mar 2010 08:08:10 +0000
Mike Pall wrote:
> It doesn't compile any of the pattern matching functions. Checking
> for a simple single-char match is possible, but that would be just
> a workaround for a specific case. The real solution is to add a
> pattern matching compiler. That's planned, but no ETA, yet.
Yes, pattern matching compiler would be great to have.
Even with it, there will be specific cases especially if you optimize
agressively. For instance, search for short strings when SSE4.2 is
available is a special case.
> Much easier (and faster) to use a pattern with captures:
>
> for tag, val in string.gmatch(msg, "([^=\001]*)=([^\001]*)\001") do
> ...
> end
I used a slighly different pattern (I also captured a position).
It was faster in plain Lua and a bit slower with LuaJIT.
Alex