220 25843 <09bfdbe7-70d9-4d25-9f51-4b79cecfb79f@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Morwenn <morwenn29@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Fixed-size views and spans
Date: Sun, 8 May 2016 02:44:58 -0700 (PDT)
Lines: 85
Approved: news@gmane.org
Message-ID: <09bfdbe7-70d9-4d25-9f51-4b79cecfb79f@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_2087_973212256.1462700698492"
X-Trace: ger.gmane.org 1462700749 18211 80.91.229.3 (8 May 2016 09:45:49 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 8 May 2016 09:45:49 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC2ZP4V74IFBBHEVXS4QKGQEIDYYRLA@isocpp.org Sun May 08 11:45:42 2016
Return-path: <std-proposals+bncBC2ZP4V74IFBBHEVXS4QKGQEIDYYRLA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f199.google.com ([209.85.214.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC2ZP4V74IFBBHEVXS4QKGQEIDYYRLA@isocpp.org>)
	id 1azLGp-0004cr-6v
	for gclcip-std-proposals@m.gmane.org; Sun, 08 May 2016 11:45:03 +0200
Original-Received: by mail-ob0-f199.google.com with SMTP id je7sf329544233obb.0
        for <gclcip-std-proposals@m.gmane.org>; Sun, 08 May 2016 02:45:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=r5SHIKekdrFjBamz8muTuqv54f2mEznmj5pd3b624hg=;
        b=EaW5+191ufMN0mZ6HLWYgbhw4+Vbxmu+4zaP9tN9cAufE8gAOi3duUfT8qW5XA2aov
         rWBXsuh1BirOFaIGGR4blBqrUuvmUpDeP9uf5dWLxclpof8Hi/Br0650YR9PtYwNtGKm
         2tJkE5256Uoz2onWKd7HA3LuLeUSlHaZsajJpcw1OeEJf3cvLS6nKOnOW2f3TDEQvcTA
         tC/AmVVJ5kKwW2W/hqk8B+EBKO+nU1HQprbbgMj6uCednjo8RnhHEBJkxZyyGBWGPbsQ
         R+bxsE+9Snwx8JGCa63mzyrDwDalK9hThMa3a4veNWyEhrdMHP1eKeggaMe8/9oGDBm/
         T0Jw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=r5SHIKekdrFjBamz8muTuqv54f2mEznmj5pd3b624hg=;
        b=b2FGq6NE9xVzN+S8qdhsMl95dtWwh+UW0TzncCBd5qGw70YG5J504R42HOT+QQE2OZ
         RMud+Mqr/Tr2SB09t7YXk/+L5hi5COkxQse7xYxCtf8+Cer8jYtKoMsjf8quAzTqESWR
         tuaWKC6XGH2/swqki5H2cEsmKxqDNcHxjeeV3sVrf6Owje1/FkZLZ0I5HPZU/3a3WwNL
         2Luoo99wcg8PgEqlEC/B+09hMEccaq5lfAa5bPTUV3OdbHPBaF0UwnPcVRfLsuRGWp9P
         hj6gYAD4P5sA6Nks1B9A2Fllz3/Juv3ZHTgvDUPxmw6ZquEk/mCgLoFzHtHWooFaGzNs
         Sfrw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=r5SHIKekdrFjBamz8muTuqv54f2mEznmj5pd3b624hg=;
        b=YkbhfZFrVE6fdX5ILTMJbRZNwVF7rrI5/k0+uJSB0Y+6waRoBj1WHifdf2o/aGsANY
         ZW5u6KOG8ROOrq1+G7mXhy2zmyBMpwhzjmU/BYHTbAjgKlxviA4kAb6HYcH8d+6fMbxy
         gHSxrNdwTq5Zp+WdYb4ghIHLifU0xN43nROPs1xGyAt5msJ6kIkE0d4DZH4FUy+5IrJV
         axqWNpOr5jqlmcdBJttxke9QuWitik8TO3UHtKtmqem+i5kn3p/RSaAovSoyjPmbwxbT
         EXFwkdsHteb4Je3qTF+tmsfBmrleOvnCZh1o4TG1Jii9h1NxFe2NzSFRGrxm3adTBp41
         OFLw==
X-Gm-Message-State: AOPr4FXco2nLy8rJkVkGkhEICeB+w8VJ8qLz9UFUXtOK9UUX31FZaZ34lX/OC5QN8Z8HcA==
X-Received: by 10.107.135.214 with SMTP id r83mr18820737ioi.19.1462700701993;
        Sun, 08 May 2016 02:45:01 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.15.103 with SMTP id x100ls1720397ioi.54.gmail; Sun, 08 May
 2016 02:45:00 -0700 (PDT)
X-Received: by 10.36.79.141 with SMTP id c135mr696itb.10.1462700700215;
        Sun, 08 May 2016 02:45:00 -0700 (PDT)
X-Original-Sender: morwenn29@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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:25843
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/25843>

------=_Part_2087_973212256.1462700698492
Content-Type: multipart/alternative; 
	boundary="----=_Part_2088_2045467701.1462700698492"

------=_Part_2088_2045467701.1462700698492
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Another quick idea: sometimes we know that we will perform an operation on=
=20
the next N element of an iterable, where N is known at compile-time. It=20
might be the case for what we could call =C2=AB bottom-up divide-and-conque=
r =C2=BB=20
algorithms. For example, WikiSort=20
<https://github.com/BonzaiThePenguin/WikiSort> starts by dividing the=20
collection to sort in chunks of 8 elements and sorting them before=20
proceeding with soe smart merging operations. We know how to speed up some=
=20
operations when the number of elements is small and known at compile-time:=
=20
sorting networks are an excellent tool to sort integers when the size of=20
the collection to sort is known at compile-time.

However there is no simple way to tell to the standard library's algorithms=
=20
that they will work with a small number of elements known at compile-time.=
=20
A solution would be to add span and view classes that take an integer=20
template parameter for their size, and let library implementers add=20
overloads to algorithms for such utility classes when they think it is=20
useful (it could still fit the Ranges TS design).

Any thoughts about the usefulness of such fixed-size span and view classes?

--=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/09bfdbe7-70d9-4d25-9f51-4b79cecfb79f%40isocpp.or=
g.

------=_Part_2088_2045467701.1462700698492
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Another quick idea: sometimes we know that we will perform=
 an operation on the next N element of an iterable, where N is known at com=
pile-time. It might be the case for what we could call =C2=AB bottom-up div=
ide-and-conquer =C2=BB algorithms. For example, <a href=3D"https://github.c=
om/BonzaiThePenguin/WikiSort">WikiSort</a> starts by dividing the collectio=
n to sort in chunks of 8 elements and sorting them before proceeding with s=
oe smart merging operations. We know how to speed up some operations when t=
he number of elements is small and known at compile-time: sorting networks =
are an excellent tool to sort integers when the size of the collection to s=
ort is known at compile-time.<br><br>However there is no simple way to tell=
 to the standard library&#39;s algorithms that they will work with a small =
number of elements known at compile-time. A solution would be to add span a=
nd view classes that take an integer template parameter for their size, and=
 let library implementers add overloads to algorithms for such utility clas=
ses when they think it is useful (it could still fit the Ranges TS design).=
<br><br>Any thoughts about the usefulness of such fixed-size span and view =
classes?<br></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/09bfdbe7-70d9-4d25-9f51-4b79cecfb79f%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/09bfdbe7-70d9-4d25-9f51-4b79cecfb79f=
%40isocpp.org</a>.<br />

------=_Part_2088_2045467701.1462700698492--
------=_Part_2087_973212256.1462700698492--

.
