lua-users home
lua-l archive

Re: Fast loading of very large "symbol" tables

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


For simple mapping, how about:
field = " Field1 12345 Field2 45678" -- note space at the start of the string
function fieldMap(key)
 return tonumber(string.match(field, "%s" .. key .. "%s(%d*)"))
end
The field string can be loaded from a file.
Vaughan
2008年11月20日 M Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
>
> On 2008年10月13日, A.S. Bradbury wrote:
>
>> tinycdb[1] is a public domain implementation which uses mmap. I have
>
> If a pure lua cdb reader is required, try cdb.lua from
>
> http://discontinuity.info/~rowan/cdb.lua
>
> Cheers,
>
> Joonas

AltStyle によって変換されたページ (->オリジナル) /