From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86C93C4727C for ; Thu, 1 Oct 2020 11:15:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 457B22087D for ; Thu, 1 Oct 2020 11:15:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eV67PVbl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731647AbgJALPN (ORCPT ); Thu, 1 Oct 2020 07:15:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726992AbgJALPN (ORCPT ); Thu, 1 Oct 2020 07:15:13 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56217C0613D0 for ; Thu, 1 Oct 2020 04:15:13 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id t17so2583964wmi.4 for ; Thu, 01 Oct 2020 04:15:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=P+13ygnNCiBfKy7fguaozyNdZJnIoolmv9b8k84pLFg=; b=eV67PVbl34PZSNafvXyAsv7g1h/EBWz+CRQvZRamcv7zzX3tB90tDjdGd22EsmE6XR Ox19EfZ/lzSPTlzmdn4YfR9rL+85JjUtKphy6VPbFwPEzZTq9uLkr4uh+/6MEt/+dfa3 VX5N6x+d1fpJ2uVnMzzEBUV2eqT6j8Tl80CU++c8XnZuxVqhWckFpPSnHbr7Te2zUrYb Kk3c/NZNjfr9n+aJRtjXEZ85leLyQR5BVZxWchAyYRWg/epe3AOSzfkuwaJ5kB4kQS4/ hfKrmIZGC5D3JJi/hi5LPci9SCO5F9gk+egVXwy4IuZqRfOoAO7wXKcZqyRmMBFI0iBj 7ulg== 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=Ok1mAqNQnuj9bMCeSa3dnPAEtNa3rBpNJjf+n0S3pFeI6cuCIaL9WvhEVamkxediw+ Xs7FIVEDz4TDnFVrickPzSerwO0M8KvFKwP5NYiEK0lL7p9FggaPjGujnPRBHx1mZHmh ZJpmKRdF53eSNmWrxXajhhDXzL7PTrR2iL/19Yx4knB1kDGWtzbFFwfGRnd9KuL3viJp EClFeA0wsXhwJFYQ3WlAyTaRnSnKcwhVsKh1L5WrgKVXa1V8HlR+g6Rx1KODt6rMKw1k +DLhUwWB/cVin9MMbxkfHhP6Se5PK3ltlrIQRUS1OSo4byYaAbXvMr6tsdnz54/2BaFM rgJA== X-Gm-Message-State: AOAM532k2kGzWjLd9LCNe2sVZkn6FKRtOcBAlBd62QJ+HneRgfxFliRD 2NobFCwD7mEY6BfGpYlEBlmPw/YLfGEsXg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-man@vger.kernel.org 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