220 35519 <4569243.5CL4mZyDPR@tjmaciei-mobl1> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Rotational shift operator
Date: Sat, 25 Nov 2017 12:24:21 -0800
Lines: 44
Approved: news@gmane.org
Message-ID: <4569243.5CL4mZyDPR@tjmaciei-mobl1>
References: <69593098-e2cc-487e-bd14-9001b27aa7c1@isocpp.org> <3031585.uCQqKE2Qzv@tjmaciei-mobl1> <9a7a898c-9e14-532f-fc4a-11d0aa5a1bf7@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1511641473 14842 195.159.176.226 (25 Nov 2017 20:24:33 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 25 Nov 2017 20:24:33 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRB7NC47IAKGQEJGQUGSI@isocpp.org Sat Nov 25 21:24:27 2017
Return-path: <std-proposals+bncBCB4TK757YBRB7NC47IAKGQEJGQUGSI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wr0-f198.google.com ([209.85.128.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCB4TK757YBRB7NC47IAKGQEJGQUGSI@isocpp.org>)
	id 1eIgzu-00035Y-VX
	for gclcip-std-proposals@m.gmane.org; Sat, 25 Nov 2017 21:24:23 +0100
Original-Received: by mail-wr0-f198.google.com with SMTP id v69sf12258838wrb.3
        for <gclcip-std-proposals@m.gmane.org>; Sat, 25 Nov 2017 12:24:30 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1511641470; cv=pass;
        d=google.com; s=arc-20160816;
        b=ckGoGnLGqpumkPuPI49tpD3zLSSkMWrZz434VybrCR9wlN5rZOoFAYNRU/FbtfKRP2
         ud3cuC5dOTjGaOfgSV5mjty5YAKFb/SDjFkybpXSz9wG+QNa+cP4seSAsYB+A/FpRrla
         xM9THNKJ2XFvrscaGoc5KAP3sS9uCtd/fS8Wwx2kZwAKnOtCFwYvQU6yvBWmxOz3JH15
         tyMusQ8P7IzSsKi1Vv8jY8qsrNWKQlJ+8X6a2FJXglpHuVWmVIl0nzXpVzyIem897SWL
         oUzEh5RaQJI+bTV7mxB5kshxvHPmuegioDC0wkX5+/zEGTvOK7af51+fXIzqTNB1+YZq
         Cjdw==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:content-transfer-encoding
         :mime-version:references:in-reply-to:message-id:date:subject:to:from
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=f7N2hRA1/CG4TYLAxhOKotgnYJuhUsan2igfEknmMKo=;
        b=IQLVkzBZIJx/KfHlWj+c6J1ot3egjwz4M4zKFqMiYqCC7BrdFyIf4NiqjZ1UDmWFfO
         /Qa3vvbqOBWKwP+5X1tguLpYzZ6fbjuqNJTEpw/DFsr7yMe7viXPQA2DhRq0PcF3JMdr
         DKNrWCWbwXdtzHbPQXvsRLMc1cWUxJIlEQqFDlL8qgUs69C1VLrwuukXuyVofUpl6TpG
         KQhIyy3Hwd0D0XV5Jj7XeLBFC/twwq/Hc+6t5bLgC0VgIJffJQ3O9LrjhkZxSECcVPz1
         1V4/ZseCuS22lgi13+GT5VM3f9qDVnC5iywgHVtOlNuMI/OuRX/IDa0ph2D9cpv3pwDd
         9iMw==
ARC-Authentication-Results: i=2; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mailfrom=thiago@macieira.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:to:subject:date:message-id:in-reply-to:references:mime-version
         :content-transfer-encoding:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=f7N2hRA1/CG4TYLAxhOKotgnYJuhUsan2igfEknmMKo=;
        b=sqhGATZE42t/131CSRUOVGdwfyqE+MjybeWs0EQTtrz2cqEJgpkeKNGxGERJtM5Y9E
         JGY5yQl5sP+QSQs4KV62v/tZCUK0wwDERnWn73Nag+XJcSZ6snJi401bxqaiiJU7NosQ
         r2lyI4DEKOm/m9HSWdgmjaCFcwbDKUP5eyvCl0OvgGjV/xUwvxRozAEiDYmQ0tc6LPno
         XEyQkpTqojaRUFeh6l51ibUsRFN9r2DoaFluUEYFHLrphoZCmBnqqTeADO3cCJmk6dLA
         9QlyLdTEk1iWL/vAaUKg07IUfX3SRN4BL1NQ/dq/lnRDFibr211Q6FwvhQPvRGj/SJTv
         2+nA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
         :references:mime-version:content-transfer-encoding:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=f7N2hRA1/CG4TYLAxhOKotgnYJuhUsan2igfEknmMKo=;
        b=PBLhUYLBT14I/XGxI8BojYiZrzB0x0pGfnUXjgl+T+CcVu9vtW/lDQdJ1HYImKfRn7
         uQ3zuW4xfyrz/dzuwyCkbjDn3PnPTC3LeLvALtPQUhhrCo+rD+ElHsUytDocORWtmfzx
         4/aogD757nYilEuGUpv+Zve2QjSrl407LjFXO9pjhDrI0qmGrY0SyrfQsnnPVaxJfVYu
         hcyJZIC4NWeTScu/HM7TN+Sm/Co8Xr8I8eILNcA4prfzn7zLvteAONsT1zDTYluoAg25
         90yVoMFSbQPDPRsc5871vc7Rpqb96lUV97uJ1rSTJ6SOHzm5f92X1bseDVDmM/09EYn2
         OsC 
X-Gm-Message-State: AJaThX6n3eEep5xpRwPydw2kHC3ifj5+ngvCfnDUpNDvymyYo2rvE9xU
	CObbE8+aiZZizgmlswmu6yuimA==
X-Google-Smtp-Source: AGs4zMY6k3Y7HA6vqaiq3Ja+0gg0ZLTLSFTHaJEZodcyS/T+fy0wDA52m0Mq3WeuEzExmvNuUVxFTA==
X-Received: by 10.28.133.78 with SMTP id h75mr1411678wmd.25.1511641470283;
        Sat, 25 Nov 2017 12:24:30 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.144.2 with SMTP id s2ls2434672wmd.12.canary-gmail; Sat, 25
 Nov 2017 12:24:28 -0800 (PST)
X-Received: by 10.28.60.8 with SMTP id j8mr11858640wma.136.1511641468671;
        Sat, 25 Nov 2017 12:24:28 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1511641468; cv=none;
        d=google.com; s=arc-20160816;
        b=yBDT1QjqhTZCPGQ+Kw/31/TKk/3T6l1L/JS+WGGCLDkOeSvFsXqpVXaRW8owqNNa5g
         Au91VbMX8ambfQBuIqOa4TyNcx89gMCVh1f4pRgO8/x3KAhbX7zkPM9PxjrysNB6gpJM
         RaOOflwcd6hVmg5vcXbyiHIM6rMexA3ZbZLyUyHLBEEY02pLYBNSt3RoPBqUn21NeQkd
         4YQqBxH01LPWEqhDI7NqY/gI/S9dYKz/jkIpt8v0RLltWC5wafyXaVGo42OGChm1fYUv
         qYHPevGLdzQtmqiaYHGE8LxmmawYUR1OuTnH6o1u9valZXbHJhkX5mneCz1vnvTt8UJI
         8tqA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:to:from:arc-authentication-results;
        bh=VQ7XLJMNG8ntGvz12pdJrMxzKntM4JlqDspzOITfWws=;
        b=FnP9G1TFTDCHkkUFV4x+27Qe5koGZSB/2r1tYw9kNvbMli2NGjdoWG0SaTBoKG6/J6
         +FpRr4zBMYn01+laP1V7BOJ8QqPmSLSV9B3lf7WGoVzomsaDecsRhr+QFOAb6yhUQCpp
         MbeJscO+YdtXBRAWV3u3ijn7JKtY1vSwOdu12ZRM8omc409WsrxabzfzZ4/q1KC0wPHx
         lp2dcnDH3cmR6qmRcBLfeHJaGFLBjbG37Q01pN9A/P6pBUQfgqEJAkvxJDMN9sW8KGYr
         bbrrmwzF/J/JOSCYoAILucyYZ+Yj9oQ4PPpitxQVKLJzLsks2nu26faE37Ssk09a93cK
         NKFA==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mailfrom=thiago@macieira.org
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [78.47.120.188])
        by mx.google.com with ESMTP id l53si14540700wrl.149.2017.11.25.12.24.28
        for <std-proposals@isocpp.org>;
        Sat, 25 Nov 2017 12:24:28 -0800 (PST)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) client-ip=78.47.120.188;
Original-Received: from tjmaciei-mobl1.localnet (unknown [IPv6:2601:1c0:4501:5f9f:10a8:5dac:57fd:2747])
	by gondolin.macieira.info (Postfix) with ESMTPSA id 95F0011A634
	for <std-proposals@isocpp.org>; Sat, 25 Nov 2017 12:24:24 -0800 (PST)
In-Reply-To: <9a7a898c-9e14-532f-fc4a-11d0aa5a1bf7@gmail.com>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mailfrom=thiago@macieira.org
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:35519
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/35519>

On s=C3=A1bado, 25 de novembro de 2017 04:08:07 PST Andrey Semashev wrote:
> > The high-level language doesn't need that because the compilers are sma=
rt
> > enough to notice the pattern of two-shifts-and-or as a rotation and wri=
te
> > assembly accordingly.
>=20
> Well, the compilers were not always that smart, and if we had the
> standard rotation functions or operators from the start, people wouldn't
> have to write assembler code and compilers wouldn't need to be taught to
> recognize certain code patterns. Reliability of this recognition has
> always been and will be a question of QoI, i.e. something that cannot be
> relied on.

True, chicken-and-the-egg: if the operators had been available, perhaps the=
y=20
would have been used more often.

But my assertion remains: if they had really been needed, they'd have been=
=20
standardised and added to some language by now. For now, they only exist as=
=20
intrinsics in <x86intrin.h>.

> I'm not arguing for operators or functions approach here. I'm saying
> that dedicated rotation operations are long overdue in C and C++.

I dispute that. They can only be overdue if you needed them and didn't have=
=20
them. Since you can do rotation right now, you have them.

--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/4569243.5CL4mZyDPR%40tjmaciei-mobl1.

.
