<html xmlns:v="urn:schemas-microsoft-com:vml" 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=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks for the confirmation<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Marius<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Bradley Lowekamp [mailto:blowekamp@mail.nih.gov]
<br>
<b>Sent:</b> woensdag 10 april 2013 18:07<br>
<b>To:</b> Bill Lorensen<br>
<b>Cc:</b> Staring, M. (LKEB); Insight Developers<br>
<b>Subject:</b> Re: [Insight-developers] fill<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I was able to get quite similar numbers on RH w/ gcc 4.4.7 in standard release mode:<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">Array size = 100, repetitions = 20000000<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The elapsed time for a C++ fill_n 690000 ms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The elapsed time for a itk.Fill 1910000 ms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The elapsed time for a C fill 2620000 ms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Array size = 1000, repetitions = 2000000<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The elapsed time for a C++ fill_n 460000 ms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The elapsed time for a itk.Fill 1700000 ms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The elapsed time for a C fill 2520000 ms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Array size = 10000, repetitions = 200000<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The elapsed time for a C++ fill_n 420000 ms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The elapsed time for a itk.Fill 1680000 ms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The elapsed time for a C fill 2510000 ms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Array size = 100000, repetitions = 20000<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The elapsed time for a C++ fill_n 570000 ms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The elapsed time for a itk.Fill 1670000 ms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The elapsed time for a C fill 2510000 ms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Array size = 1000000, repetitions = 2000<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The elapsed time for a C++ fill_n 600000 ms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The elapsed time for a itk.Fill 1680000 ms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The elapsed time for a C fill 2510000 ms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Array size = 10000000, repetitions = 200<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The elapsed time for a C++ fill_n 1510000 ms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The elapsed time for a itk.Fill 1820000 ms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The elapsed time for a C fill 2540000 ms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I did modify the test to set the value to 3.14, instead of 0, because other optimization may happen with a zero value...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Brad<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">On Apr 10, 2013, at 11:33 AM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Or maybe Ubuntu is milliseconds and windows is seconds?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Wed, Apr 10, 2013 at 11:28 AM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>> wrote:<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">The Ubuntu timings are much longer than windows. Was that expected?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">On Wed, Apr 10, 2013 at 10:42 AM, <<a href="mailto:M.Staring@lumc.nl" target="_blank">M.Staring@lumc.nl</a>> wrote:<o:p></o:p></p>
</div>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br>
-----Original Message-----<br>
From: Staring, M. (LKEB)<br>
Sent: woensdag 10 april 2013 16:28<br>
To: Insight Developers (<a href="mailto:insight-developers@itk.org" target="_blank">insight-developers@itk.org</a>)<br>
Subject: FW: fill<br>
<br>
Forgot to include the maliing list<br>
<br>
-----Original Message-----<br>
From: Staring, M. (LKEB)<br>
Sent: woensdag 10 april 2013 16:24<br>
To: 'Williams, Norman K'; <a href="mailto:blowekamp@mail.nih.gov" target="_blank">
blowekamp@mail.nih.gov</a><br>
Cc: <a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a><br>
Subject: RE: fill<br>
<br>
Hi,<br>
<br>
Attached you can find some timings for different POD types, I tested for short, int, float and double. std::fill_n is always faster, but less so for longer types.<br>
<br>
I simply modified itk::Array::Fill to use std::fill_n instead of referring to the vnl_vector::fill which uses a simple loop over the data. Not sure if this is the way to go, but my experimental looks green:<br>
<br>
<a href="http://open.cdash.org/buildSummary.php?buildid=2871413" target="_blank">
http://open.cdash.org/buildSummary.php?buildid=2871413</a><br>
<br>
The patch I just submitted to gerrit:<br>
<br>
<a href="http://review.source.kitware.com/#/c/10801/" target="_blank">http://review.source.kitware.com/#/c/10801/</a><br>
<br>
Curious to your comments,<br>
<br>
Regards, Marius<br>
<br>
-----Original Message-----<br>
<br>
<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">_______________________________________________<br>
Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://kitware.com/products/protraining.php" target="_blank">http://kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><span style="color:#888888"><br>
<br clear="all">
<br>
<span class="hoenzb">-- </span><br>
<span class="hoenzb">Unpaid intern in BillsBasement at noware dot com</span></span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <br>
Unpaid intern in BillsBasement at noware dot com<o:p></o:p></p>
</div>
<p class="MsoNormal">_______________________________________________<br>
Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://kitware.com/products/protraining.php">http://kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-developers">http://www.itk.org/mailman/listinfo/insight-developers</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>