[Tarantool-patches] [PATCH vshard 1/1] router: bucket_id_strcrc32 and bucket_id_mpcrc32

Konstantin Osipov kostja.osipov at gmail.com
Sun Mar 1 19:52:28 MSK 2020


* Vladislav Shpilevoy <v.shpilevoy at tarantool.org> [20/02/29 20:14]:
> On 27/02/2020 07:53, Konstantin Osipov wrote:
> > * Vladislav Shpilevoy <v.shpilevoy at tarantool.org> [20/02/27 09:42]:
> >>> * Vladislav Shpilevoy <v.shpilevoy at tarantool.org> [20/02/26 09:31]:
> >>>> Closes #207
> >>>
> >>> While you're at it, is this hardware crc32?
> >>
> >> Yes, this is hardware, when possible. And it is in C. See crc32.c
> >> files (there are two of them).
> > 
> >  I mean the entire method could be in C, including building a
> >  msgpack string from cdata.
> 
> But how building MessagePack is related to crc32? We will need to
> do that in C anyway. Now I am doing that via msgpackffi, which is
> fast enough.

Calling msgpackffi from Lua is slow unless the method is JITed. 

Most of the overhead is coming from invoking functions, not from
what they do.

If you had a single Lua-C function which would take all arguments
from Lua stack and return crc32 it may be faster.


-- 
Konstantin Osipov, Moscow, Russia
https://scylladb.com


More information about the Tarantool-patches mailing list