220 33851 <188dc31c-df5e-4fe1-ad85-847d3d732880@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Niall Douglas <nialldouglas14@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: string_view for fstream::open()
Date: Fri, 11 Aug 2017 15:29:22 -0700 (PDT)
Lines: 65
Approved: news@gmane.org
Message-ID: <188dc31c-df5e-4fe1-ad85-847d3d732880@isocpp.org>
References: <cb7b55ab-7113-4d99-949b-8568627d0b7f@isocpp.org> <CANh-dX=_vJGW1nxKEEjiSJ_=-+hkUab6i5KVSWJYe03ooBmnfA@mail.gmail.com> <CAA7U3HM=a7==w_ruj=7XAE-00KC2nDJh5wtodhQgW3v8LuVWEA@mail.gmail.com>
 <3456831.gsseCm4DuK@tjmaciei-mobl1>
 <6240d6af-a518-4788-a56f-b7d0c8976dc4@isocpp.org>
 <01739e89-fc83-428b-94d5-e4e06927cc80@isocpp.org>
 <c779961a-2aa5-437f-994e-d7df2573e8f5@isocpp.org>
 <25b20004-c1b3-4844-b957-ef57e043b533@isocpp.org>
 <15b49197-b38b-47be-aefb-0786af7635f2@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_2478_1398369499.1502490562918"
X-Trace: blaine.gmane.org 1502490572 20676 195.159.176.226 (11 Aug 2017 22:29:32 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 11 Aug 2017 22:29:32 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDGKFT5YZADRBQ67XDGAKGQETITSXKA@isocpp.org Sat Aug 12 00:29:23 2017
Return-path: <std-proposals+bncBDGKFT5YZADRBQ67XDGAKGQETITSXKA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it0-f71.google.com ([209.85.214.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDGKFT5YZADRBQ67XDGAKGQETITSXKA@isocpp.org>)
	id 1dgIQg-0004Wn-F1
	for gclcip-std-proposals@m.gmane.org; Sat, 12 Aug 2017 00:29:18 +0200
Original-Received: by mail-it0-f71.google.com with SMTP id 77sf55422870itj.4
        for <gclcip-std-proposals@m.gmane.org>; Fri, 11 Aug 2017 15:29:25 -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:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=VmXUFXJCFSE1eDZ2qjMmvgpWDDBLm1y+pOc+tXKiiL4=;
        b=0H6aITp+aEeC3fERfpGXUi+aiwdVSS6fcfG0V9YhG1pKyVlg4tAYO4oXY3lrKq3J80
         pC0HPWmSNnEqQGloa5LE9sWR0mMnclUlWzLLvLrTl8oVEVaUdPLnO3ihgGbP1TCEtXb4
         V3eWxgDewmIdtnZZkmqQyq3qjS2VMmHCxAm0rpm9xzgnwe+HTFN08140PVc0kjS8PdJ2
         pcnccAm5gFWNXVWp81yh13bZa9pNixXRmCx6NApK7jfWSE49LsPPPY6VMAtPvSewTycG
         PCm8aOMjhPIhDluwdQpum52CY1BVjRFsJ3rOIxgleIs7AQAv0gcyGIc79XzTT8GusRuz
         4wug==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=VmXUFXJCFSE1eDZ2qjMmvgpWDDBLm1y+pOc+tXKiiL4=;
        b=JW5MiQwbk+j5YzfXRQecAIDaaoGhuuPGXkTbqgyjLJ0ph2y/OQ+cwwEm+mmoDAKl30
         yx4mVIL4Sd9BOniqzcKj/xTuAcp9SEq1tXZtA1SyXaZmsoKtHOxiEG0a+s95XoQRtaCX
         o4yD9522OiZrxJceObzed+m0r68aJZfIyxRzB2hiDpU3TUyJViAgWFxe/lsRxldUy8HL
         Fz5cKjsawoTFFvFMmK2TY3jsVBBYnzAtAhKCageA6tVxHHkDrV6gKLufWt9CC5nOQJFC
         cdwAfzKPoU+eID3O/ilVGDIjpnfvduR6MfZEC7yTdbH0rqrhV/0+WTPXk3ljL6OM5gp1
         NIjw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :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=VmXUFXJCFSE1eDZ2qjMmvgpWDDBLm1y+pOc+tXKiiL4=;
        b=hgiFs9j8i0ghyJvinjS50mciEKGkmoueIUqHZ/wa2pPfVbcVWq90OYZqwcaD0Uuil0
         0/wusdzRY4Q5NCaxCqJECT1S3TK1TQt/aS8weQ8rDxs+LS1KwZmvKF2AZUn3pmhI4C+e
         U8Vg7LIDSq9N/OOKmDFhs/VHvO1lMTWnzWnyze5wBSr7WEuvVTnQ7odlsS0gBKoWGuCf
         3bpxfQEXPa0nxKus2PkYSOlMopH1BoNkfGDxYL/mgdt8LlZIgZC8ssAYfXfltppnf9yu
         sGUBdZ154aIwpVqjMEb2mBCKdH27Sp1agMSgnFfFsbLx5Q/xdzzjUF3ZYapZrcDrZ7MF
         nFZQ==
X-Gm-Message-State: AHYfb5jBIv9pWkWiv1oS7ChNdjrV1kpFo3BhUIWoIDHz+EdI4OwhqcwM
	JnHYWLbubKeTXOys
X-Received: by 10.36.1.136 with SMTP id 130mr127936itk.3.1502490564606;
        Fri, 11 Aug 2017 15:29:24 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.51.142 with SMTP id k136ls419642itk.7.gmail; Fri, 11 Aug
 2017 15:29:23 -0700 (PDT)
X-Received: by 10.31.160.13 with SMTP id j13mr109122vke.25.1502490563438;
        Fri, 11 Aug 2017 15:29:23 -0700 (PDT)
In-Reply-To: <15b49197-b38b-47be-aefb-0786af7635f2@isocpp.org>
X-Original-Sender: nialldouglas14@gmail.com
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:33851
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33851>

------=_Part_2478_1398369499.1502490562918
Content-Type: multipart/alternative; 
	boundary="----=_Part_2479_1598270752.1502490562918"

------=_Part_2479_1598270752.1502490562918
Content-Type: text/plain; charset="UTF-8"


>
>
> Or we can just have a single `filesystem::path` type, which you can get 
> views of with existing types. I prefer that option.
>

As already covered in great detail by now, if fed a string_view then one is 
mandated to memcpy the lot so it can be zero terminated before sending it 
to the file path consuming syscall.

As much as open() is not a fast syscall, copying 32Kb needlessly makes a 
statistically noticeable difference. path_view eliminates that problem.

Niall
 

-- 
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 email 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/188dc31c-df5e-4fe1-ad85-847d3d732880%40isocpp.org.

------=_Part_2479_1598270752.1502490562918
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr"><div><br>Or we can just have a single `filesystem::path` type, which yo=
u can get views of with existing types. I prefer that option.</div></div></=
blockquote><div><br></div><div>As already covered in great detail by now, i=
f fed a string_view then one is mandated to memcpy the lot so it can be zer=
o terminated before sending it to the file path consuming syscall.</div><di=
v><br></div><div>As much as open() is not a fast syscall, copying 32Kb need=
lessly makes a statistically noticeable difference. path_view eliminates th=
at problem.</div><div><br></div><div>Niall</div><div>=C2=A0</div></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/188dc31c-df5e-4fe1-ad85-847d3d732880%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/188dc31c-df5e-4fe1-ad85-847d3d732880=
%40isocpp.org</a>.<br />

------=_Part_2479_1598270752.1502490562918--

------=_Part_2478_1398369499.1502490562918--

.
