From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16821 invoked by alias); 1 Sep 2016 15:35:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 16757 invoked by uid 89); 1 Sep 2016 15:35:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=bah, HTo:U*libstdc X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 01 Sep 2016 15:35:47 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C7EAD4E4E1; Thu, 1 Sep 2016 15:35:46 +0000 (UTC) Received: from localhost (ovpn-116-94.ams2.redhat.com [10.36.116.94]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u81FZjP6017375; Thu, 1 Sep 2016 11:35:45 -0400 Date: Thu, 01 Sep 2016 15:35:00 -0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org Cc: Eelis van der Weegen , gcc-patches Subject: Re: [patch, libstdc++] std::shuffle: Generate two swap positions at a time if possible Message-ID: <20160901153544.GQ3342@redhat.com> References: <5728B8CC.7030405@eelis.net> <20160831124502.GH3342@redhat.com> <20160901151446.GP3342@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.7.0 (2016-08-17) X-SW-Source: 2016-09/txt/msg00054.txt.bz2 On 01/09/16 17:27 +0200, Marc Glisse wrote: >On Thu, 1 Sep 2016, Jonathan Wakely wrote: > >>>>+ const __uc_type __comp_range = __swap_range * (__swap_range + 1); >> >>If __swap_range is 3, then __comp_range is 10 and > >??? Bah :-) Thanks. I guess I read the code correctly the other day at least!