lua-users home
lua-l archive

Re: Protocol Specification in Lua

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


Alexander Gladysh <agladysh@gmail.com> [2010年10月03日 00:16:51]:
Hi,
> It still would be slow. Specialized serialization library is faster.
> AFAIR luabins.load() is about 7 times faster than loadsting. Saving is
> about this much faster as well than my serialize-to-lua function.
Well, fair enough, but we would need to define the use case first :-) For
example, if I'm talking about protocol in UDP packet, I mean usually one
packet per command, which is for me something under 500 bytes. Processing of
such packet is damn[1] fast on EP93xx/ARM9 or PXA270 CPU in my use case :-)
1. Haven't measured it yet how many of such packets/sec can be processed. But
 I believe that it's quite a lot.
> > I'm fairly sure it would be possible to write a bytecode verifier for
> > this small subset, also, to make loading into normal Lua safe within
> > scripts. Perhaps even an in-Lua interpreter for it for the paranoid :)
> 
> Maybe, but why bother? Also, again, I think, it would be hard to make
> it faster than specialized code.
I totaly agree here.
BTW, thanks for the pointer to your luabins project, will give it a try for
sure.
-- ynezz

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