<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Yup, the policy change was codified recently: <a href="http://lists.llvm.org/pipermail/llvm-dev/2020-January/138085.html">
http://lists.llvm.org/pipermail/llvm-dev/2020-January/138085.html</a>.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">About GitHub, there’s been lots of llvm-dev debates about GitHub vs. Phabricator, but I don’t know if the possibility of subprojects changing their review system was considered. (I personally like Phabricator, but I don’t have enough experience
with GitHub PRs to say anything about them.)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><ldionne@apple.com> on behalf of Louis Dionne <ldionne@apple.com><br>
<b>Date: </b>Wednesday, February 19, 2020 at 1:31 PM<br>
<b>To: </b>Shoaib Meenai <smeenai@fb.com><br>
<b>Cc: </b>"libcxx-commits@lists.llvm.org" <libcxx-commits@lists.llvm.org><br>
<b>Subject: </b>Re: [libcxx-commits] [libcxx] c3478ef - [libc++] reduce <complex> parsing time<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On Feb 19, 2020, at 16:25, Shoaib Meenai <<a href="mailto:smeenai@fb.com">smeenai@fb.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Helvetica">We try to handle attribution of changes by just setting the author field in the git commit now. See<span class="apple-converted-space"> </span></span><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_docs_DeveloperPolicy.html-23commit-2Dmessages&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=rTeq1HdyCtYZWyLGsSxBjOoO4IUZ7mrthiai2E_bSOc&s=lu5boFekgKzKt1XPwzDF57K7LKCF48zjhbu7FpnP3vo&e="><span style="font-size:9.0pt;font-family:Helvetica">https://llvm.org/docs/DeveloperPolicy.html#commit-messages</span></a><span class="apple-converted-space"><span style="font-size:9.0pt;font-family:Helvetica"> </span></span><span style="font-size:9.0pt;font-family:Helvetica">(the
part about `git commit --amend -author=foo`).</span><o:p></o:p></p>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Did that change recently? Actually, I commit so many patches from contributors that I was thinking we should move libc++ contributions to GitHub PRs. That would handle attribution automatically and it would be a huge time saver for me.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Louis<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Helvetica"><br>
On 2/19/20, 1:11 PM, "libcxx-commits on behalf of Louis Dionne via libcxx-commits" <</span><a href="mailto:libcxx-commits-bounces@lists.llvm.org"><span style="font-size:9.0pt;font-family:Helvetica">libcxx-commits-bounces@lists.llvm.org</span></a><span class="apple-converted-space"><span style="font-size:9.0pt;font-family:Helvetica"> </span></span><span style="font-size:9.0pt;font-family:Helvetica">on
behalf of<span class="apple-converted-space"> </span></span><a href="mailto:libcxx-commits@lists.llvm.org"><span style="font-size:9.0pt;font-family:Helvetica">libcxx-commits@lists.llvm.org</span></a><span style="font-size:9.0pt;font-family:Helvetica">> wrote:<br>
<br>
<br>
Author: Louis Dionne<br>
Date: 2020-02-19T16:09:41-05:00<br>
New Revision: c3478eff7a65d6a77b34e756eabc7176a2b422e8<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/c3478eff7a65d6a77b34e756eabc7176a2b422e8">
https://github.com/llvm/llvm-project/commit/c3478eff7a65d6a77b34e756eabc7176a2b422e8</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/c3478eff7a65d6a77b34e756eabc7176a2b422e8.diff">
https://github.com/llvm/llvm-project/commit/c3478eff7a65d6a77b34e756eabc7176a2b422e8.diff</a><br>
<br>
LOG: [libc++] reduce <complex> parsing time<br>
<br>
Instead of including <ios> for ios_base::failbit, simply get failbit<br>
member of the template argument. Print directly to a stream instead<br>
of using intermediate ostringstream.<br>
<br>
Parsing time: 874ms -> 164ms (-81%)<br>
<br>
Thanks to Nikita Kniazev for the patch!<br>
<br>
Differential Revision:<span class="apple-converted-space"> </span></span><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.llvm.org_D71214&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=XuTdLMSODcBurUaZJqLFRiaiyfpAa42AzWBOtuIiGIo&s=3_bf2u3BzVaTij2ojvXF2pRN5HaZoTadNpfdnHKropw&e="><span style="font-size:9.0pt;font-family:Helvetica">https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.llvm.org_D71214&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=XuTdLMSODcBurUaZJqLFRiaiyfpAa42AzWBOtuIiGIo&s=3_bf2u3BzVaTij2ojvXF2pRN5HaZoTadNpfdnHKropw&e=</span></a><span class="apple-converted-space"><span style="font-size:9.0pt;font-family:Helvetica"> </span></span><span style="font-size:9.0pt;font-family:Helvetica"><br>
<br>
Added:<span class="apple-converted-space"> </span><br>
<br>
<br>
Modified:<span class="apple-converted-space"> </span><br>
libcxx/include/complex<br>
<br>
Removed:<span class="apple-converted-space"> </span><br>
<br>
<br>
<br>
################################################################################<br>
diff --git a/libcxx/include/complex b/libcxx/include/complex<br>
index c168406befbd..92295be976cc 100644<br>
--- a/libcxx/include/complex<br>
+++ b/libcxx/include/complex<br>
@@ -243,7 +243,7 @@ template<class T, class charT, class traits><br>
#include <type_traits><br>
#include <stdexcept><br>
#include <cmath><br>
-#include <sstream><br>
+#include <iosfwd><br>
#include <version><br>
<br>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)<br>
@@ -1406,10 +1406,10 @@ operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)<br>
__x = complex<_Tp>(__r, __i);<br>
}<br>
else<br>
- __is.setstate(ios_base::failbit);<br>
+ __is.setstate(__is.failbit);<br>
}<br>
else<br>
- __is.setstate(ios_base::failbit);<br>
+ __is.setstate(__is.failbit);<br>
}<br>
else if (__c == _CharT(')'))<br>
{<br>
@@ -1417,10 +1417,10 @@ operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)<br>
__x = complex<_Tp>(__r, _Tp(0));<br>
}<br>
else<br>
- __is.setstate(ios_base::failbit);<br>
+ __is.setstate(__is.failbit);<br>
}<br>
else<br>
- __is.setstate(ios_base::failbit);<br>
+ __is.setstate(__is.failbit);<br>
}<br>
else<br>
{<br>
@@ -1429,11 +1429,11 @@ operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)<br>
if (!__is.fail())<br>
__x = complex<_Tp>(__r, _Tp(0));<br>
else<br>
- __is.setstate(ios_base::failbit);<br>
+ __is.setstate(__is.failbit);<br>
}<br>
}<br>
else<br>
- __is.setstate(ios_base::failbit);<br>
+ __is.setstate(__is.failbit);<br>
return __is;<br>
}<br>
<br>
@@ -1441,12 +1441,7 @@ template<class _Tp, class _CharT, class _Traits><br>
basic_ostream<_CharT, _Traits>&<br>
operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)<br>
{<br>
- basic_ostringstream<_CharT, _Traits> __s;<br>
- __s.flags(__os.flags());<br>
- __s.imbue(__os.getloc());<br>
- __s.precision(__os.precision());<br>
- __s << '(' << __x.real() << ',' << __x.imag() << ')';<br>
- return __os << __s.str();<br>
+ return __os << '(' << __x.real() << ',' << __x.imag() << ')';<br>
}<br>
<br>
#if _LIBCPP_STD_VER > 11<br>
<br>
<br>
<br>
_______________________________________________<br>
libcxx-commits mailing list<br>
</span><a href="mailto:libcxx-commits@lists.llvm.org"><span style="font-size:9.0pt;font-family:Helvetica">libcxx-commits@lists.llvm.org</span></a><span style="font-size:9.0pt;font-family:Helvetica"><br>
</span><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_libcxx-2Dcommits&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=XuTdLMSODcBurUaZJqLFRiaiyfpAa42AzWBOtuIiGIo&s=TK2KMcCqvhVplbQrWBvFZeh08C5F0zsMjwyRxF2Rqfo&e="><span style="font-size:9.0pt;font-family:Helvetica">https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_libcxx-2Dcommits&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=XuTdLMSODcBurUaZJqLFRiaiyfpAa42AzWBOtuIiGIo&s=TK2KMcCqvhVplbQrWBvFZeh08C5F0zsMjwyRxF2Rqfo&e=</span></a><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
</div>
</body>
</html>