From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id EFF093858CDA for ; Fri, 30 Dec 2022 14:31:35 +0000 (GMT) Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBGQ2-0003KL-78; Fri, 30 Dec 2022 09:31:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=6n2aY69pnCtyVfq1KkYfiHzRj8W0kv8of9GcPrW5dKs=; b=m2C0ezxS0DBW 5WmxyL82o0k1KQnHuofppNIynbpY+m/17m7ou2+5nDiBxFNWmqOldPGyaRXsrNkEbozfyC5RuzN7Z ao4uENTri5wT9LtgD4yWo4WBfQt9FcPvZ+c7STotyDvNnYxbovqZTd91mDucyT324WM1xgH2L1C6/ Grwl8KK4snJuSWdOyqJZt98PfpzQyfnzwBFrmdYqUMYokweFTzXtclS1Zl4ZitYUlSnDpENaT0gpV gqxlwvqaM40ZtNE664Gop6uUEkFnA2V+gFVxhdf4JJiYSjCDdCeXJfBDyV/+ttSpISez4k4ARC2Hd h1MO/LbjutM6xVX7zQZZew==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBGQ1-0007k9-Nt; Fri, 30 Dec 2022 09:31:34 -0500 Date: Fri, 30 Dec 2022 16:31:31 +0200 Message-Id: <835ydt6jzw.fsf@gnu.org> From: Eli Zaretskii To: Simon Marchi Cc: tom@tromey.com, gdb-patches@sourceware.org, luis.machado@arm.com In-Reply-To: <587b899f-0f93-530a-7313-d4e1f9e501b9@simark.ca> (message from Simon Marchi on Thu, 29 Dec 2022 15:22:31 -0500) Subject: Re: Two observations using GDB 13 snapshot References: <83h6xugc5v.fsf@gnu.org> <58b64bf8-90b6-d080-c060-d03761501199@arm.com> <83k02neezy.fsf@gnu.org> <835ye7e9jw.fsf@gnu.org> <87h6xrks77.fsf@tromey.com> <83mt7idacj.fsf@gnu.org> <87fsd4elb2.fsf@tromey.com> <83o7rs4qmg.fsf@gnu.org> <87cz84dasj.fsf@tromey.com> <835ydw20bw.fsf@gnu.org> <87wn6bbi5m.fsf@tromey.com> <83sfgz8m9i.fsf@gnu.org> <87o7rnb0ya.fsf@tromey.com> <83a6368chf.fsf@gnu.org> <87k02aaxc8.fsf@tromey.com> <83wn6a6n21.fsf@gnu.org> <587b899f-0f93-530a-7313-d4e1f9e501b9@simark.ca> X-Spam-Status: No, score=1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > Date: Thu, 29 Dec 2022 15:22:31 -0500 > Cc: gdb-patches@sourceware.org, luis.machado@arm.com > From: Simon Marchi > > > It looks like we spend a lot of time sorting the vector of index > entries. We spend a lot of time in tolower. Why do we need to use tolower in sorting here? is the sorting order case-insensitive or something? > Googling a bit, it looks > like tolower can be slow on Windows when a locale (other than "C") is > used: > > https://stackoverflow.com/questions/36686381/windows-c-runtime-toupper-slow-when-locale-set > https://bugs.php.net/bug.php?id=45265 I couldn't see any numbers there about the performance of tolower itself, i.e. how many ms per call does it take on Windows vs glibc. But if someone can show a patch to try to eliminate the calls to tolower, I can try and see if it affects the processing time in this scenario. Thanks.