From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id 770153858C2C for ; Tue, 4 Jan 2022 12:12:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 770153858C2C Received: by mail-wm1-x334.google.com with SMTP id b73so23109448wmd.0 for ; Tue, 04 Jan 2022 04:12:53 -0800 (PST) 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=CSMMYGlUPxaH9pATepOE5D+3MwaG3ekxyMFUsavVfB0=; b=sdxdZRKXzNNaOok9zSGb22BU1R8FMsb3W6udcWjsp1D6ry6GOy9Fz3B9JbH48/OKtW hE4NoV2FI6glrcQIsOFVPBLsFPL7Oi95+3ln3n0XunCMENC2XKOIgROFv6a4/E0XuBuZ FiPotpyu0HztZdQ3/fEXnUZkxxZSyslOaA16bS7ev2PHCQ6iT0xG9QRI+T4OGLF+KYNO LRw+jMXlV0wKlMELZazA9WxfHv8SmbugLc7gEuj+Q5F5Wo8UYwAu0cF92vT9jONcYJue ePpqNL/wSNA9Tg+rfhUcleM3qo5HgYiLJJD9AiRsBUKJhrJLCUI90Q3ufBAU2UGaLg6E 0q4A== X-Gm-Message-State: AOAM531P/h9BT0s9IGHu+rWSHXPK3xhNjESEs9Y7JakqpQdXiAK2EnZM ANiga9hFV23aaKpUYXeNXLhV5muqx5ZcNoI/jWE= X-Google-Smtp-Source: ABdhPJzPypPBthLz3FjM2c5/F1nOoAoppKXNd0Kh8sPltEWSonqIxAp2sO3279YREB0PCxPbsJiodPgUCdf0G03xTXQ= X-Received: by 2002:a05:600c:1e05:: with SMTP id ay5mr42368197wmb.131.1641298371462; Tue, 04 Jan 2022 04:12:51 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Tue, 4 Jan 2022 12:12:40 +0000 Message-ID: Subject: Re: Fw: binary size To: Ming Cheng Cc: gcc-help Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Tue, 04 Jan 2022 12:12:54 -0000 On Tue, 4 Jan 2022 at 11:42, Ming Cheng wrote: > > Hi Jonathan, > I just pasted a lib. It's applicable to binary. I am wondering whether there is a way to generate smaller binary by ver 10.2.1 close to 7.3.1? Would bigger size binary slower ? It depends why it's bigger. As I said, it's probably due to debug info, which doesn't affect performance at all. Using 'ls' to check the size is not helpful, because it doesn't tell you anything about the size of the executable code in the binary. Use 'size' to do that. Even if that shows the code is bigger, that doesn't mean it's going to be slower. The only way to tell if it's slower is to measure if it's slower. tl;dr it depends.