POV-Ray : Newsgroups : povray.general : AVX, does it improve Povray performance? Server Time
25 Nov 2024 15:26:59 EST (-0500)
  AVX, does it improve Povray performance? (Message 1 to 3 of 3)  
From: jhu
Subject: AVX, does it improve Povray performance?
Date: 14 Feb 2014 01:50:01
Message: <web.52fdbaf725f07cbed19b0ec40@news.povray.org>
Apparently it does by about 4%. Not quite sure how or why though.

Intel Core i5 3317U (Ivy Bridge) @ 1.7 GHz (turbo 2.4 GHz), Ubuntu 12.04

gcc 4.8, -march=core-avix-i -mavx
  Photon Time:      0 hours  0 minutes  2 seconds (2.558 seconds)
              using 7 thread(s) with 2.981 CPU-seconds total
  Radiosity Time:   No radiosity
  Trace Time:       0 hours  7 minutes 58 seconds (478.870 seconds)
              using 4 thread(s) with 1909.554 CPU-seconds total

gcc 4.8, -march=core-avx-i -msse2
  Photon Time:      0 hours  0 minutes  2 seconds (2.607 seconds)
              using 7 thread(s) with 3.055 CPU-seconds total
  Radiosity Time:   No radiosity
  Trace Time:       0 hours  8 minutes 18 seconds (498.217 seconds)
              using 4 thread(s) with 1986.597 CPU-seconds total


Post a reply to this message

From: Le Forgeron
Subject: Re: AVX, does it improve Povray performance?
Date: 14 Feb 2014 04:49:03
Message: <52fde68f$1@news.povray.org>
Le 14/02/2014 07:45, jhu a écrit :
> Apparently it does by about 4%. Not quite sure how or why though.
> 
> Intel Core i5 3317U (Ivy Bridge) @ 1.7 GHz (turbo 2.4 GHz), Ubuntu 12.04
> 
> gcc 4.8, -march=core-avix-i -mavx
>   Photon Time:      0 hours  0 minutes  2 seconds (2.558 seconds)
>               using 7 thread(s) with 2.981 CPU-seconds total
>   Radiosity Time:   No radiosity
>   Trace Time:       0 hours  7 minutes 58 seconds (478.870 seconds)
>               using 4 thread(s) with 1909.554 CPU-seconds total
> 
> gcc 4.8, -march=core-avx-i -msse2
>   Photon Time:      0 hours  0 minutes  2 seconds (2.607 seconds)
>               using 7 thread(s) with 3.055 CPU-seconds total
>   Radiosity Time:   No radiosity
>   Trace Time:       0 hours  8 minutes 18 seconds (498.217 seconds)
>               using 4 thread(s) with 1986.597 CPU-seconds total

There is a few operations (functions in povray) applied to vector (3 or
more double/float) which might enjoy such optimisation.

SSE2 is using only 128 bits of data (2 doubles), whereas AVX is able to
use 256 bits (4 doubles).

The operations are simple, but repeated a lot of time so grabbing a few
cycles per operation gives that change.


-- 
Just because nobody complains does not mean all parachutes are perfect.


Post a reply to this message

From: jhu
Subject: Re: AVX, does it improve Povray performance?
Date: 16 Feb 2014 18:40:00
Message: <web.53014c1a84612ff2d19b0ec40@news.povray.org>
Le_Forgeron <lef### [at] freefr> wrote:
> Le 14/02/2014 07:45, jhu a écrit :
> > Apparently it does by about 4%. Not quite sure how or why though.
> >
> > Intel Core i5 3317U (Ivy Bridge) @ 1.7 GHz (turbo 2.4 GHz), Ubuntu 12.04
> >
> > gcc 4.8, -march=core-avix-i -mavx
> >   Photon Time:      0 hours  0 minutes  2 seconds (2.558 seconds)
> >               using 7 thread(s) with 2.981 CPU-seconds total
> >   Radiosity Time:   No radiosity
> >   Trace Time:       0 hours  7 minutes 58 seconds (478.870 seconds)
> >               using 4 thread(s) with 1909.554 CPU-seconds total
> >
> > gcc 4.8, -march=core-avx-i -msse2
> >   Photon Time:      0 hours  0 minutes  2 seconds (2.607 seconds)
> >               using 7 thread(s) with 3.055 CPU-seconds total
> >   Radiosity Time:   No radiosity
> >   Trace Time:       0 hours  8 minutes 18 seconds (498.217 seconds)
> >               using 4 thread(s) with 1986.597 CPU-seconds total
>
> There is a few operations (functions in povray) applied to vector (3 or
> more double/float) which might enjoy such optimisation.
>
> SSE2 is using only 128 bits of data (2 doubles), whereas AVX is able to
> use 256 bits (4 doubles).
>
> The operations are simple, but repeated a lot of time so grabbing a few
> cycles per operation gives that change.

The original comparison is a little flawed. Both binaries were compiled with
different versions of gcc. Here's a more apt comparison running on Ubuntu 13.10,
both binaries compiled with gcc 4.8

-march=core-avx-i -mavx
  Photon Time:      0 hours  0 minutes  2 seconds (2.590 seconds)
              using 7 thread(s) with 3.034 CPU-seconds total
  Radiosity Time:   No radiosity
  Trace Time:       0 hours  8 minutes  9 seconds (489.257 seconds)
              using 4 thread(s) with 1954.087 CPU-seconds total

-march=core-avx-i -msse2
  Photon Time:      0 hours  0 minutes  2 seconds (2.583 seconds)
              using 7 thread(s) with 3.015 CPU-seconds total
  Radiosity Time:   No radiosity
  Trace Time:       0 hours  8 minutes  8 seconds (488.213 seconds)

Result: no significant performance difference.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.