From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107588 invoked by alias); 19 Jun 2017 10:35:35 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 106955 invoked by uid 89); 19 Jun 2017 10:35:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=expense, Hx-languages-length:1523, worrying X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Jun 2017 10:35:33 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D5368635C5 for ; Mon, 19 Jun 2017 10:35:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D5368635C5 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D5368635C5 Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8759780DE1; Mon, 19 Jun 2017 10:35:34 +0000 (UTC) Subject: Re: Regression: Re: [PATCH 2/6] Code cleanup: dwarf2read.c: Eliminate ::file_write To: Jan Kratochvil References: <8efc0742-1014-4fe0-6948-f40a9c5c4975@redhat.com> <1497284051-13795-2-git-send-email-palves@redhat.com> <20170618183603.GA1834@host1.jankratochvil.net> <0d3d940c-c6d6-02df-69a0-defdd300f92f@redhat.com> <20170619093927.GA24763@host1.jankratochvil.net> <20170619100302.GA25357@host1.jankratochvil.net> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <83a85ba5-8443-5bb1-cfd2-7ea4b6cc952d@redhat.com> Date: Mon, 19 Jun 2017 10:35:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20170619100302.GA25357@host1.jankratochvil.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-06/txt/msg00503.txt.bz2 On 06/19/2017 11:03 AM, Jan Kratochvil wrote: > On Mon, 19 Jun 2017 11:47:51 +0200, Pedro Alves wrote: >> But as I said, it can't be exactly the >> same as the original one, because it simply wouldn't compile. > > I haven't found a benchmark whether the gdb::byte_vector optimization was > really worth complicating the codebase. GDB has more serious performance > problems than such microoptimizations. That's not a valid argument for justifying performance regressions. byte_vector avoids premature pessimization, at no real expense of readability, and makes it easier to actually use std::vector (because that's what byte_vector is) in more cases without worrying about whether that'd cause a regression vs a dynamic array, as I've showed in the patch that introduced it. The C++ breakpoints series from a couple weeks back has some performance fixes, and I'll be happy to review more patches that help with any of those performance problems you may be alluding to. > One of the goals of the move to C++ was to remove all the GDB-specific > language constructs making it easier to contribute. Now GDB is becoming > written in its own language again, just based on C++ this time. That's a gross exaggeration. In any case, a byte buffer is not semantically the same as a vector of integers. And custom containers and other similar data structures don't seem to have caused an issue for competing toolchains, btw. Thanks, Pedro Alves