lua-users home
lua-l archive

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


>> luajit-msgpack-pure seems on par with lua-MessagePack, except for some
>> bad
>> edge cases (iary10000, dary1000)
>
> I did some experiments with FFI (see the branch 'ffi'
> http://github.com/fperrad/lua-MessagePack/tree/ffi),
> but on my hardware, I don't see improvement.

Yes, François has shown me his code early and it turns out some
of my assumptions were wrong, including the fact that encoding
floating point numbers in pure Lua code is faster than using
a C cast with the FFI.

As far as I am concerned this library almost makes
luajit-msgpack-pure redundant. Also, I think there are too
many MessagePack implementations out there. I would like
to see a "standardization" around Antirez's and François'
implementations. If they could have compatible APIs it would
be even better.

If you need background on the mess MessagePack in Lua is,
read https://gist.github.com/2971290 ;) We have to move away
from this.

That being said François' implementation is not API-compatible
with luajit-msgpack-pure so migration is not trivial.
luajit-msgpack-pure is also "more stable" if that means anything.
Finally I do not think lua-MessagePack implements extensions for
compatibility with msgpack-js yet (see
https://github.com/catwell/luajit-msgpack-pure/issues/6).

I will keep maintaining luajit-msgpack-pure for a while but
in the long run I think François' approach is better
(maybe not from an API point of vue, I still prefer explicitly
returning offsets to abstracting them with iterators,
but that's not a blocking problem for me).

Long story short: if you are already using and satisfied with
luajit-msgpack-pure, do not hurry to migrate, but if you start
a new project it may be better to go with lua-MessagePack.

-- 
Pierre Chapuis