[Mono-dev] amd64 SSE2 Sqrt patch

Zoltan Varga vargaz at gmail.com
Fri Apr 11 13:32:35 EDT 2008


Hi,

   This is ok to check in.

                   Zoltan

2008/4/11 Jonathan Chambers <joncham at gmail.com>:
> Hello,
>       Inspired by the patch for an SSE2 implementation of Abs
> (http://permalink.gmane.org/gmane.comp.gnome.mono.patches/111238), I tried
> Sqrt. This is only my 2nd JIT patch and my first involving an SSE intrinsic
> so any reviews would be appreciated. I see about a 14% speedup using the
> following benchmark (with N=1000000000):
>
> using System;
>
> class Program
> {
>         static void Main(string[] args)
>         {
>                 int count = int.Parse(args[0]);
>                 double d = 1.0;
>                 for (int i = 0; i < count;i++)
>                  {
>                         d = Math.Sqrt(i);
>                 }
>                 Console.WriteLine(d);
>         }
> }
>
> I ran it 10 times and get average time of:
>
> Orig
> 30.5517s
>
>  SSE
> 26.1512s
>
> Code is contributed under MIT/X11
>
> Thanks,
> Jonathan
>
>
>
>
> _______________________________________________
>  Mono-devel-list mailing list
>  Mono-devel-list at lists.ximian.com
>  http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>


More information about the Mono-devel-list mailing list