From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 8 Jun 2018 06:18:46 +0300 From: Konstantin Osipov Subject: Re: [tarantool-patches] Re: [PATCH v2 1/1] box: create bigrefs for tuples Message-ID: <20180608031846.GA6866@chai> References: <9c250cefbee4375f722235eaf234b734bf98b83d.1527867534.git.imeevma@gmail.com> <8844c62d-284e-3461-d5cb-969dedbe5348@tarantool.org> <871b6d2c-677c-00f4-230f-25782a6b4fd1@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <871b6d2c-677c-00f4-230f-25782a6b4fd1@tarantool.org> To: tarantool-patches@freelists.org Cc: Vladimir Davydov , Imeev Mergen List-ID: * Vladislav Shpilevoy [18/06/05 00:01]: > > +/** Initialize big references container. */ > > +static inline void > > +bigref_list_create() > > +{ > > +    bigref_list.size = 0; > > +    bigref_list.refs = NULL; > > +    bigref_list.capacity = 0; > > 2. Memset is faster than per-member resetting. We with > Vladimir Davydov have benched it. This code runs only once at program startup. Please do not apply memset() optimization to it. I have been using memset() myself for things I have seen take a lot of CPU time with a profiler and on a very common workload. Thanks, -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov