220 8384 <028701aa-9798-4cd1-a77f-9fa4f9de0b79@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: fmatthew5876@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Proposal: standardize [[noinline]]
Date: Thu, 2 Jan 2014 21:56:12 -0800 (PST)
Lines: 69
Approved: news@gmane.org
Message-ID: <028701aa-9798-4cd1-a77f-9fa4f9de0b79@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_10263_32875881.1388728572210"
X-Trace: ger.gmane.org 1388728571 10329 80.91.229.3 (3 Jan 2014 05:56:11 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 3 Jan 2014 05:56:11 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDELF54RTIGRB7NBTGLAKGQEURQEDRY@isocpp.org Fri Jan 03 06:56:19 2014
Return-path: <std-proposals+bncBDELF54RTIGRB7NBTGLAKGQEURQEDRY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pa0-f70.google.com ([209.85.220.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDELF54RTIGRB7NBTGLAKGQEURQEDRY@isocpp.org>)
	id 1Vyxjy-0005cW-U9
	for gclcip-std-proposals@m.gmane.org; Fri, 03 Jan 2014 06:56:15 +0100
Original-Received: by mail-pa0-f70.google.com with SMTP id fa1sf48076120pad.1
        for <gclcip-std-proposals@m.gmane.org>; Thu, 02 Jan 2014 21:56:13 -0800 (PST)
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:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe:content-type;
        bh=etBeDBfLb3hjCb711eFPwRUJyMUlFy4hvn9TbifEEGw=;
        b=nrwdEmXnXeIfvie9X7oqmlclwAtJdNLkJEJ9NuFC4p+aLj0jIvBTmUMLu7IQzlSbCS
         36bLBcmVR7kS2rwQxY7YoPXYxcpKjKbJqrfvhS1QVahpzvxg+yFHFNTFpm62vLn3gACN
         dgkZasMyt5FW6yClWyfVPcIC0Esv+6OskrjG3/D5BgzKcId0iVef1j+1j/4seNYtFkV5
         1lr5WvpBZAZEmmV/36CW6kmtlXuUUxNRSHBXwfiFGf8QtcHrsfVfl7WOYHYMNX7H3zqK
         O071ogkhizexdv+Ek6lMOtGw/1Cm3iWsi8B4PW7caEBYw79tcfm+MkI39REClb5XE3L3
         /dfQ==
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
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=etBeDBfLb3hjCb711eFPwRUJyMUlFy4hvn9TbifEEGw=;
        b=cTtyLq/LA2HJYvu7GsphZbzsf99zVPCSzzQMyUQvjgkUhfskr8p5EMxY9Z9K17Taqp
         GtY8tnq6eyHeuFUO4Wnzvguo/gwwBb39rlm1RY15vVELctixdbJnYHI5zfPfnwKsefTy
         TdOf08ww4V1p2xtWQxBkmvxdNtER3Nmx0P20VkAEA7UMbHtn/xE7Uv0U3pJ3wnv0Lrxz
         +q4ouRggxq66a7CWr42NDWPQycm67QQn8INX3T55MDKD/9FLsO4ux83Ylda77McfNb2J
         QEsupTASo8gMGayy9DQ05fanX27k/+ZjiFC67+NHxK21AeN11I8eIjz4mAq8Z0EOsLEh
         6Nfw==
X-Gm-Message-State: ALoCoQktY8KZKVTmtqHTCsGpBBBUdQ122iPTY+4vJ1dIdhzl5uYJQnu2vVnQqmUesI1deCTSOnIU
X-Received: by 10.68.254.230 with SMTP id al6mr35177656pbd.6.1388728573747;
        Thu, 02 Jan 2014 21:56:13 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.37.195 with SMTP id a3ls4588800qek.88.gmail; Thu, 02 Jan
 2014 21:56:12 -0800 (PST)
X-Received: by 10.49.94.144 with SMTP id dc16mr1803qeb.21.1388728572927;
        Thu, 02 Jan 2014 21:56:12 -0800 (PST)
X-Original-Sender: fmatthew5876@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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:8384
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8384>

------=_Part_10263_32875881.1388728572210
Content-Type: text/plain; charset=ISO-8859-1

Inlining is one of the most powerful performance features of C++. Modern 
compilers may attempt to inline anything, even non-inline functions. With 
the advent of link time optimization / whole program optimization, inlining 
is potentially and unpredictably on the table for any function in the 
entire application. 

Sometimes we want to write synthetic code, particularly for benchmarks 
where we want to isolate a bit of code to test its performance. We don't 
want any details of the caller interfering with the code to be tested. In 
many cases, the compiler will even optimize out our test entirely if it 
does not produce a meaningful result. In this important use case, inlining 
can get in the way.

The best way to write such benchmarks is to use __attribute__((noinline)) 
or its proposed standard equivalent [[noinline]]. This attribute ensures a 
function is compiled stand alone, without any influence from callers.Thus 
we can be confident in isolating it and testing its performance portably 
across all of our supported platforms.

Any objections?

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_10263_32875881.1388728572210
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Inlining is one of the most powerful performance features =
of C++. Modern compilers may attempt to inline anything, even non-inline fu=
nctions. With the advent of link time optimization / whole program optimiza=
tion, inlining is potentially and unpredictably on the table for any functi=
on in the entire application.&nbsp;<div><br></div><div>Sometimes we want to=
 write synthetic code, particularly for benchmarks where we want to isolate=
 a bit of code to test its performance. We don't want any details of the ca=
ller interfering with the code to be tested. In many cases, the compiler wi=
ll even optimize out our test entirely if it does not produce a meaningful =
result. In this important use case, inlining can get in the way.</div><div>=
<br></div><div>The best way to write such benchmarks is to use __attribute_=
_((noinline)) or its proposed standard equivalent [[noinline]]. This attrib=
ute ensures a function is compiled stand alone, without any influence from =
callers.Thus we can be confident in isolating it and testing its performanc=
e portably across all of our supported platforms.</div><div><br></div><div>=
Any objections?</div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_10263_32875881.1388728572210--

.
