<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<html><head><meta name="Generator" content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        text-align:right;
        direction:rtl;
        unicode-bidi:embed;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:.5in;
        margin-bottom:0in;
        margin-left:0in;
        margin-bottom:.0001pt;
        text-align:right;
        direction:rtl;
        unicode-bidi:embed;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body bgcolor="white" lang="EN-US" link="blue" vlink="purple"><div class="WordSection1"><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><span style="color:#1F497D">Using ipy64 gave better results of 14.8 sec but still not as good as the 32 bit.</span></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><span style="color:#1F497D">I did do the ngen but Im not sure I did properly.</span></p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">
<span style="color:#1F497D">BTW, my real application is hosted on .net application, does ngen affect me in this case?</span></p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><span style="color:#1F497D"> </span></p>
<div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> <a href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</a> [mailto:<a href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</a>] <b>On Behalf Of </b>Lukas Cenovsky<br>
<b>Sent:</b> Friday, September 03, 2010 1:17 PM<br><b>To:</b> Discussion of IronPython<br><b>Subject:</b> Re: [IronPython] performance hit on 64 bit systems</span></p></div></div><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">
</p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">Wild guess:<br> - do you run 64-bit IronPython on 2008 R2?<br> - did you NGEN 64-bit IronPython and the app?<br><br>--<br>-- Lukáš<br><br>
<br>On 3.9.2010 12:04, Idan Zaltzberg wrote: </p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">Hello,</p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">I'm trying to migrate a big application (running on IronPython 2.6.1) from a 32 bit OS (windows server 2003 R2) to a 64 bit system (windows server 2008 R2).</p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">I have noticed about 50% performance hit, i.e. operations that took 10 seconds, now take 15 seconds.</p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">
I have tried to see the what is the root cause and created the following test, and ran it on both systems:</p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"> </p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">
def f():</p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"> sw.Reset()</p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"> sw.Start()</p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">
for x in xrange(n):</p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"> s='string:%s' % (x,)</p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">
print sw.Elapsed.TotalSeconds</p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><span dir="RTL"></span><span lang="HE" dir="RTL" style="font-family:"Arial","sans-serif""><span dir="RTL"></span> </span></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">from System.Diagnostics import Stopwatch</p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">sw = Stopwatch()</p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">
n = 1e7</p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">f()</p><p class="MsoListParagraph" style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt;text-align:left;text-indent:-.25in;direction:ltr;unicode-bidi:embed">
<span style="font-family:Wingdings">è</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif""> </span><b>11.7766457 (In windows server 2003 R2 – 32 bit)</b></p><p class="MsoListParagraph" style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt;text-align:left;text-indent:-.25in;direction:ltr;unicode-bidi:embed">
<span style="font-family:Wingdings">è</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif""> </span><b>16.3231212 (In windows server 2008 R2 – 64 bit)</b></p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">
<b> </b></p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">Which matches the about 50% loss I have seen on my system.</p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">
On the other hand, the equivalent code in cpython yields <b>slightly better results to the 64 bit OS</b> (3.7 sec to the 64 bit, against 4.1 sec to the 32 bit).</p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">
</p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">I hoped you might help to understand why this as happened and can I improve the performance in any way for 64 bit systems.</p><p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">
Thanks.</p><pre> </pre><pre> </pre><pre>_______________________________________________</pre><pre>Users mailing list</pre><pre><a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a></pre><pre><a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a></pre>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""> </span></p></div></body></html>