From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id 392D83860C08 for ; Thu, 26 May 2022 11:05:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 392D83860C08 Received: by mail-wm1-x329.google.com with SMTP id p19so817456wmg.2 for ; Thu, 26 May 2022 04:05:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DspUMJwNIjARbnlj7D2cE+mF5Mem6doAR1XAj6aQJlU=; b=oEco8YH6aDKJbUohH98iETM0AVw7qnjvznQCsoVK73eTKgci6/x7VgJdRDUnhXnDZ6 I7WU8KVsU/XTK6pWx2bHHQ5r0tbhkazl4xRavIImPmzxsSjiUUFcIrICTAcwy8sDNM8I sYCWnko+KPrDN/xGbHEXMhlWu9Yov3dIS+icgJw2FIJUSRjrEPonSy5h8wJnV10muEMl KsXlqjBPVOVCeTVzPvQuoyDHe59RcseUDhaKPj1mygAAvSc9q5WLWYJT8+cAAHmQ+EBZ vxhkBhr6pFhNoBw0MMADkG3NC+B7OUd2c2ulvgVwteFw7IJxf3eLnSYEclq8EiHOUraD MCXA== X-Gm-Message-State: AOAM533jIqhnPObALZNEzlufZ7ZvZNO7ctg9PtVLy0QM9zqnY6eYQpd7 CLwOnWq1DN9DapFN4Ohxi2wU32mMKY9DNM/qj+M= X-Google-Smtp-Source: ABdhPJwtT63y8cJQWb4r1759jWLLj/4VGtZZFsvVcZKZWkxjj5siZA7O5ll8AVgOEXCFK7e13ahSrS9EOUm9Koho02U= X-Received: by 2002:a05:600c:892:b0:397:7b6c:b59d with SMTP id l18-20020a05600c089200b003977b6cb59dmr1608894wmp.85.1653563138968; Thu, 26 May 2022 04:05:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Thu, 26 May 2022 12:05:27 +0100 Message-ID: Subject: Re: -march=x86_64 -mtune=generic question To: Tom Kacvinsky Cc: Andrew Haley , gcc-help Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPAM_BODY, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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 X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2022 11:05:41 -0000 On Thu, 26 May 2022 at 11:15, Tom Kacvinsky via Gcc-help wrote: > A colleague of mine reminded me of this thread: > > slowdown with -std=gnu18 with respect to -std=c99 > > So I checked what the default C standard for GCC 8.3.0 is (gnu11) and 12.1.0 > (gnu17). So I used -std=c99 with the GCC 12.1 build of our code, and things > went back to normal (and sometimes a teensy bit better). N.B. the issue in that thread was the difference between -std=cNN and -std=gnuNN, not the changes in the value of NN. So you should be able to use -std=c17 and get the same performance as -std=c99.