From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 63CEA469719 for ; Sun, 1 Mar 2020 19:52:30 +0300 (MSK) Received: by mail-lj1-f196.google.com with SMTP id 195so872619ljf.3 for ; Sun, 01 Mar 2020 08:52:30 -0800 (PST) Date: Sun, 1 Mar 2020 19:52:28 +0300 From: Konstantin Osipov Message-ID: <20200301165228.GB25151@atlas> References: <20200226082029.GA5040@atlas> <352307e9-cc71-2f26-8beb-148a3e0cd3de@tarantool.org> <20200227065325.GF29715@atlas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH vshard 1/1] router: bucket_id_strcrc32 and bucket_id_mpcrc32 List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org * Vladislav Shpilevoy [20/02/29 20:14]: > On 27/02/2020 07:53, Konstantin Osipov wrote: > > * Vladislav Shpilevoy [20/02/27 09:42]: > >>> * Vladislav Shpilevoy [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