Return-Path: X-Original-To: apmail-mesos-reviews-archive@minotaur.apache.org Delivered-To: apmail-mesos-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4DD991898E for ; Tue, 26 Jan 2016 01:37:23 +0000 (UTC) Received: (qmail 17079 invoked by uid 500); 26 Jan 2016 01:37:23 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 17044 invoked by uid 500); 26 Jan 2016 01:37:23 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 17026 invoked by uid 99); 26 Jan 2016 01:37:22 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jan 2016 01:37:22 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 7882C288A62; Tue, 26 Jan 2016 01:37:22 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============6770597826480127288==" MIME-Version: 1.0 Subject: Re: Review Request 42762: Improved performance of 'roles::validate'. From: Joris Van Remoortere To: Michael Park Cc: Benjamin Bannier , Neil Conway , Joris Van Remoortere , mesos Date: Tue, 26 Jan 2016 01:37:22 -0000 Message-ID: <20160126013722.25059.51068@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Joris Van Remoortere X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/42762/ X-Sender: Joris Van Remoortere References: <20160126002816.12172.74428@reviews.apache.org> In-Reply-To: <20160126002816.12172.74428@reviews.apache.org> Reply-To: Joris Van Remoortere X-ReviewRequest-Repository: mesos --===============6770597826480127288== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Jan. 26, 2016, 12:28 a.m., Benjamin Bannier wrote: > > Was any of this confirm by profiling? In standard C++ there is an overloaded `operator==` for `std::string` which can compare with a `const char*`. Yes confirmed by profiler. It it constructing the strings per iteration. - Joris ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/42762/#review116231 ----------------------------------------------------------- On Jan. 26, 2016, 12:10 a.m., Joris Van Remoortere wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/42762/ > ----------------------------------------------------------- > > (Updated Jan. 26, 2016, 12:10 a.m.) > > > Review request for mesos and Michael Park. > > > Repository: mesos > > > Description > ------- > > This validation is used inside resource math which in turn is used > heavily in the code base. > The temporary string allocations caused a significant performance > degradation in this critical path. > > > Diffs > ----- > > src/common/roles.cpp 5be807018ff84174cf0cabb933f6828d458d3846 > > Diff: https://reviews.apache.org/r/42762/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Joris Van Remoortere > > --===============6770597826480127288==--