how to use power of 2 * Xeon E5?
<p>I have two servers one running one E3-1220 processor and another running two E5-2640 processors. <a href="http://ark.intel.com/compare/52269,64591" rel="nofollow">http://ark.intel.com/compare/52269,64591</a></p>

<p>The problem is that two processors server which is 5 times more expensive executes my program 2 times slower, see my question on stackoverflow <a href="http://stackoverflow.com/questions/11096169/threadpool-program-runs-much-slower-on-much-faster-server">Threadpool program runs much slower on much faster server</a>)</p>

<p>I wrote this simple program to compare E3-1220 and E5-2640
It doesn't do anything, it's just something I do in real world:</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;

namespace TestSpeed
{
    class Program
    {
        private static double a;
        private static double b;
        private static double c = 0.34;
        private static double d = 0.15;
        private static double e = 0.25;
        private static double f = 0.03;
        private static double g = 8;

        static void Main(string[] args)
        {
            Stopwatch sw = Stopwatch.StartNew();
            for (int i = 0; i &lt; 1000000000; i++)
            {
                double e = a;
                a = 1;
                double f = b;
                b = 1;
                if (true)
                {
                    double h = 1.83;

                    double j = Math.Ceiling(h/d);
                    if (j &lt;= c)
                    {
                        c = Math.Ceiling(h/d + e);
                    }
                    else if (j &gt; c)
                    {
                        c = Math.Ceiling(h/d - e);
                    }
                    if (c &lt;= -0.5)
                    {
                        a = a - f*c;
                    }

                    double k = Math.Floor(h/d);
                    if (k &lt;= g)
                    {
                        g = Math.Floor(h/d + e);
                    }
                    else if (k &gt; g)
                    {
                        g = Math.Floor(h/d - e);
                    }
                    if (g &gt; 0.5)
                    {
                        b = b + f*g;
                    }
                }

                bool result = (Math.Abs(e - a) &gt; 0) ||
                              (Math.Abs(f - b) &gt; 0);
            }
            long time = sw.ElapsedTicks / (Stopwatch.Frequency / (1000L * 1000L));
            Console.WriteLine(time);

        }
    }
}
</code></pre>

<p>E5-2640 is new Intel processor and I suppose it should be at least a little bit better then previous E3-1220 which is almost 5 times cheaper.</p>

<p>But the results are: Xeon E5-2640 is 31182 (~31 second), Xeon E3-1220 is 26650 (~26 seconds).
So the ratio is 31182/26650 = 1.17
Clock ratio is 3 / 2.5 = 1.2</p>

<p>So there are absolutely no difference between Xeon E3 and Xeon E5. E3 has 20% higher clock ratio and so works 20 percent faster. What can I do, probably I can use some special Xeon E5 instructions somehow?</p>

<p>And what's very annoying is that in real application Xeon E5 is 2 times(!!) slower than Xeon E3... (refer to my linked question)</p>

<p>So the question is - what can I do to use power of 2 * Xeon E5 configuration? What techniques should I use probably any guidelines how to program on C# to use the power of multiprocessor configurations?</p>

<p>I just disapointed that I spent $10 000 to buy server which executes my program 2 times slower than existent server which I bought for just $1 500</p>
