SIMD benchmark

Andre Tampubolon andre at lc.vlsm.org
Mon Jan 16 00:59:47 PST 2012


I just built 32 & 64 bit DMD (latest commit on git tree is
f800f6e342e2d9ab1ec9a6275b8239463aa1cee8)

Using the 32-bit version, I got this error:
Internal error: backend/cg87.c 1702

The 64-bit version went fine.

Previously, both 32 and 64 bit version had no problem.

On 01/15/2012 01:56 PM, Walter Bright wrote:
> I get a 2 to 2.5 speedup with the vector instructions on 64 bit Linux.
> Anyhow, it's good enough now to play around with. Consider it alpha
> quality. Expect bugs - but make bug reports, as there's a serious lack
> of source code to test it with.
> -----------------------
> import core.simd;
> 
> void test1a(float[4] a) { }
> 
> void test1()
> {
>     float[4] a = 1.2;
>     a[] = a[] * 3 + 7;
>     test1a(a);
> }
> 
> void test2a(float4 a) { }
> 
> void test2()
> {
>     float4 a = 1.2;
>     a = a * 3 + 7;
>     test2a(a);
> }
> 
> import std.stdio;
> import std.datetime;
> 
> int main()
> {
>     test1();
>     test2();
>     auto b = comparingBenchmark!(test1, test2, 100);
>     writeln(b.point);
>     return 0;
> }



More information about the Digitalmars-d mailing list