From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id A17933858D1E for ; Tue, 3 Jan 2023 20:35:33 +0000 (GMT) Received: by mail-wr1-x434.google.com with SMTP id az7so6517797wrb.5 for ; Tue, 03 Jan 2023 12:35:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Th5HlZCLpQrlCzl053bHTtZK46mRMMnoxWErBt2cgzc=; b=tkFYLCtE5LnlIbOGAfNQ9xMMlqgj8ZUcOENmx3aThvPsLN+JCeazkFYCT3QQ/PCYrL i4s8P4rAAcHeezvJx7oXnKaiomBHTVjDCpxMK8ruvWtlkWhpMAauMGSX0c2A4xkoMmKO Ywvflj8bBJlXrWeGjENuiMDI12bjCJ0hAPzDJIXFclKKOPfQq69aJuCptSTRLn3Y0Ckf uH+8ApmLjb2A7BfpwcN//mRXuKsm/IeP0yk6dJx8rASxTOXpvmvWoY7rx8YUH019THOq GmsiowomrpwFEehU6GgQfqx8Zay5ad/ypQXhSQFCo0vwvLQud/0E7qtbWPQYzUy+N51v thWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Th5HlZCLpQrlCzl053bHTtZK46mRMMnoxWErBt2cgzc=; b=icwI3yFNttW0TU8cd42sqTdXyRDWawslu4a9lkc14qtNTPmBWuA7ltAuvmwGO8XTNi owg95kZDb5JR8KoP7b9iDB/9+AxNCH4e5AKAInoV5K2SjyUOuJ4duTipWSFaA1FGyJIG 78o3tz3kqv4HaKxbeoFZ1o+lbfswyyOFt4ND/IPnAH8QZ4fSVx0Sdug0aI3lXUbHW4r9 GVhnBxUhFqS6rHQKewRt9FQf669OZjsuYhhG52+oyZChpFXU04Z01xr0MkRI+Nl6rDCs IzM6oQ5E2JOjWeiwvR/+VrvpjsU80/lxyGtYGuytapxigjb47tjHzdF2zm4rBHjOl60D b1tg== X-Gm-Message-State: AFqh2kofu1nYcA7J7/pM6DaDZ6UJvrol159Nusl5nMh/I5QOkDSNhhQw aGzXm35i8b3EzL6rew8uMdu9H3+dO//G3/R+2ndelg== X-Google-Smtp-Source: AMrXdXvj/3OxHd0NqtuLWfEoHovKdPHm3aV6DytY6adj6DpKfEQF0E8+aLiY1wmn9g03YNyVdbfvpqKoI8Cvy4DCSxQ= X-Received: by 2002:a5d:500c:0:b0:29c:2fe4:3987 with SMTP id e12-20020a5d500c000000b0029c2fe43987mr281857wrt.617.1672778132333; Tue, 03 Jan 2023 12:35:32 -0800 (PST) MIME-Version: 1.0 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> <835ydt6jzw.fsf@gnu.org> <83wn63z81w.fsf@gnu.org> In-Reply-To: <83wn63z81w.fsf@gnu.org> From: Christian Biesinger Date: Tue, 3 Jan 2023 15:34:54 -0500 Message-ID: Subject: Re: Two observations using GDB 13 snapshot To: Eli Zaretskii Cc: simark@simark.ca, tom@tromey.com, gdb-patches@sourceware.org, luis.machado@arm.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.9 required=5.0 tests=BAYES_00,DKIMWL_WL_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,ENV_AND_HDR_SPF_MATCH,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, Jan 3, 2023 at 3:17 PM Eli Zaretskii wrote: > > > From: Christian Biesinger > > Date: Tue, 3 Jan 2023 14:44:56 -0500 > > Cc: Simon Marchi , tom@tromey.com, gdb-patches@sourceware.org, > > luis.machado@arm.com > > > > > > 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. > > > > Seems like that could be tested by running gdb with LANG=C and/or > > commenting out the setlocale calls in gdb/main.c? > > Setting LANG in the environment doesn't have any effect on Windows, > since the Windows version of setlocale is insensitive to LANG and LC_* > environment variables. Well you could still try commenting out the setlocale call. In terms of the code, may be worth trying TOLOWER from include/safe-ctype.h instead of tolower() Christian