From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by sourceware.org (Postfix) with ESMTPS id D52623857839 for ; Thu, 1 Oct 2020 11:15:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D52623857839 Received: by mail-wm1-x343.google.com with SMTP id s13so2471035wmh.4 for ; Thu, 01 Oct 2020 04:15:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=P+13ygnNCiBfKy7fguaozyNdZJnIoolmv9b8k84pLFg=; b=djY3p8PfbRSfUEZvq9gNazCc41YRjM1QBDA5oUms59kkbBidFOjjT6Xf7a7NJMElmG PLjiOEe6MoZfUm2v4bdziQT2db5WA7HxmWxnkBjX9ajnl7m7Haa09/AfO9nH7hBrPRWy 8I9fPbEgvzIeTEx0JGgnGyFKtKXh1RXmLwsGmTGIVd7w8uEbMHhnu2WA2YSLw0oyJCZY UHF0Ch9X5DVPMSRGGi50j6ux4mQ7CIkOO8nnnDWIqSZyxs/Tl75qYAilGlCdsXR78zZd KDvVkrP/xgdt2qxQMOe5Z0sOTNZWw4kr1vU1g0G/g56D51OYYsaDhfn3JrVSsiVeypkr Qiog== X-Gm-Message-State: AOAM530dJtPPPvA63oRX+AAIuI9OgRGZ95aaXG/JUd4NT6Fbwo3z/nJz RyI6uZHma2KrO14pcQKxX5U= X-Google-Smtp-Source: ABdhPJywd1MiS6mrX3ghW06xRpJWay7p7UzpBg6YvoMzPKDqyx/S4w8Hyv56eeoaNvvAqEBS3r2AXg== X-Received: by 2002:a7b:cb81:: with SMTP id m1mr8446381wmi.140.1601550912009; Thu, 01 Oct 2020 04:15:12 -0700 (PDT) Received: from [192.168.1.143] ([170.253.60.68]) by smtp.gmail.com with ESMTPSA id i14sm9294361wro.96.2020.10.01.04.15.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Oct 2020 04:15:11 -0700 (PDT) Subject: Re: [PATCH 05/16] system_data_types.7: Add int_fastN_t family of types To: Jonathan Wakely Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org, GNU C Library , "gcc@gcc.gnu.org" References: <20201001101559.77163-1-colomar.6.4.3@gmail.com> <20201001101559.77163-6-colomar.6.4.3@gmail.com> From: Alejandro Colomar Message-ID: <8dc9e60d-f838-87d5-2fc6-c34a84118916@gmail.com> Date: Thu, 1 Oct 2020 13:15:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2020 11:15:14 -0000 On 2020-10-01 13:07, Jonathan Wakely wrote: [...] >> +Notes: >> +Some of these types may be optimized for size >> +instead of raw performance. > > I'm not sure what this tells me as a programmer. What does "raw > performance" means exactly? The text above says it's "the fastest", > but then it says "may be optimized for size". I don't know how to > interpret this. Is it fast or is it small, or something else? Is it > optimized for small size? Natural word size? Cacheline size? > > I prefer the phrasing of the caveats in the C and POSIX standards > which just say it might not be fastest for all purposes. > > How about "Where there is no single type that is fastest for all > purposes, the implementation may choose any type with the required > signedness and at least the minimum width." > > I don't see anything in this man page saying that the types > are all typedefs, rather than new types that are distinct from the > standard integer types. That seems like useful information. > Hi Jonathan, I wasn't sure about how to word it. In theory, they should be the fastest types; just that. But then, for some reason, GCC decided that int_fast8_t should be int8_t instead of int64_t, because when using arrays of int_fast8_t, it will create smaller arrays, which will be faster (less cache, etc.). (I remember having read that a long time ago, but I don't remember the source, or if it's the actual reason). How would you word that? Thanks, Alex