From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42800 invoked by alias); 17 Dec 2019 22:24:19 -0000 Mailing-List: contact dwz-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: dwz-owner@sourceware.org Received: (qmail 42291 invoked by uid 48); 17 Dec 2019 22:24:03 -0000 From: "vries at gcc dot gnu.org" To: dwz@sourceware.org Subject: [Bug default/25276] create_import_tree performance improvements Date: Tue, 01 Jan 2019 00:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: dwz X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: nobody at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2019-q4/txt/msg00172.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25276 --- Comment #7 from Tom de Vries --- (In reply to Tom de Vries from comment #6) > (In reply to Tom de Vries from comment #5) > > (In reply to Tom de Vries from comment #0) > > > which is this loop here: > > > ... > > > for (icu =3D ipu->next; icu; icu =3D icu->next) > > > icu->seen =3D false; > > > ... > > >=20 > > > It might be possible to improve here by keeping track of this data in= another > > > way, say an array of bool or a bitvector, which could be memset to ze= ro. > >=20 > > The array of bool + memset approach reduces create_import_tree phase 3 = time > > from 104.19 to 23.00. >=20 > Keeping track of min_seen and max_seen, and only memsetting the affected > region gets us 21.77. And the replacing the bool array with a bitvector with base type unsigned i= nt, gets us 11.66. --=20 You are receiving this mail because: You are on the CC list for the bug.