lua-users home
lua-l archive

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




On 24/11/16 07:42 PM, Soni L. wrote:


On 24/11/16 07:03 PM, David Given wrote:
On 23/11/16 21:35, Soni L. wrote:
[...]
It's usually called "someone else".
https://github.com/SoniEx2/Stuff/blob/master/lua/String.lua
Thanks, but I was rather hoping for something that didn't involve so
much interpreted Lua; it's not that I'm worried about the size, but
performance is important here.

And I don't have LPEG.

I'm tending towards the compile-and-execute method right now, actually.
It's ugly, but it's also a reasonably trusted environment, and it would
let me combine it with some other code (for parsing numbers and booleans).


You're worried about me calling some weird C functions to do the whole string processing? I mean... yeah, sure, it's 2-pass, but still...

It's 100% string.find-powered. The time spent as "interpreted Lua" is tiny.


Correction: It's multi-pass. It does something like 5 passes through the string, I think...

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.