POV-Ray : Newsgroups : povray.programming : optimizing / 3dnow Server Time
24 Dec 2024 11:25:17 EST (-0500)
  optimizing / 3dnow (Message 1 to 4 of 4)  
From: josh
Subject: optimizing / 3dnow
Date: 16 May 2001 03:27:43
Message: <3B022C14.C6D41740@smileyface.com>
Hi there.

I've been playing with the POV source for two weeks or so, looking for
happy things I could do with 3dnow.  Judging by some horribly calculated
benchmarks and a few passes through CodeAnalyst:

I think you might be able to get about a 4% speed increase by using
3dnow for color operations.  Not everywhere mind you, a small chunk of
3dnow in the middle of floating point code is a bad thing.

There seems to be a similar increase from simply aligning COLOURs to 8
bytes by padding them to 6 elements rather than 5.  This would of course
backfire on large scenes that don't fit in memory.  (If it's not just a
hallucination :)

Some parts of the BBox code might benefit from 3dnow.  Check_And_Encode
seems to be used a lot (iirc, around 10% cpu time in my tests), and
afaict isn't hurt by using single precision.  'Course I can't say I
really understand it, so what do I know? ;)

I was also puzzled by the following from the area light code:
            New_v1 = (int)ceil  ((v1 + v2)/2.0);
            New_u2 = (int)floor ((u1 + u2)/2.0);
I'm having a hard time seeing why floating point functions were even
considered here.  All the variables involved are ints.  Is there some
condition where this is diffeent from this?:
            New_v1 = ((v1 + v2 + 1) / 2);
            New_u2 = ((u1 + u2) / 2);
I don't think it makes much of a difference time-wise, but it just seems
very strange to me.

Some other things from my early, naive attempts: with all single prec
math (DBL = float) it can't even parse scenes properly, and with all
VECTORs as single prec, x and y are not perpendicular.  (could probly be
fixed by changing some #defines, but in retrospect, I doubt it would be
a good idea)

Just thought someone might find this interesting.

-josh


Post a reply to this message

From: Christoph Hormann
Subject: Re: optimizing / 3dnow
Date: 16 May 2001 03:48:49
Message: <3B023105.179EA60C@gmx.de>
josh wrote:
> 
> Hi there.
> 
> I've been playing with the POV source for two weeks or so, looking for
> happy things I could do with 3dnow.  Judging by some horribly calculated
> benchmarks and a few passes through CodeAnalyst:
> 
> I think you might be able to get about a 4% speed increase by using
> 3dnow for color operations.  Not everywhere mind you, a small chunk of
> 3dnow in the middle of floating point code is a bad thing.
> 

There was already a previous attempt on that:

Subject: 3D!Now
Date: Sat, 27 Jan 2001 11:06:06 +0100
From: "Daniel Jungmann" <DSJ### [at] gmxnet>
Newsgroups: povray.unofficial.patches

Daniel made a patch, but he did not release it to public.  It uses some
MS-Compiler specific things for implementation.  I recently contacted him
on that, but i got no reply.   

There was quite some discussion in this and some of the following threads
on portability and other things so you might want to read it.  

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: josh
Subject: Re: optimizing / 3dnow
Date: 23 May 2001 13:50:54
Message: <3B0BF8CD.9BE38CBC@smileyface.com>
hmm, thanks.
I would look at that except time seems to have started in february, no
matter how much I argue with netscape.
Ah well, I wasn't planning on pursuing this much further any time soon
anyway.

-josh


Christoph Hormann wrote:
> 
> 
> There was already a previous attempt on that:
> 
> Subject: 3D!Now
> Date: Sat, 27 Jan 2001 11:06:06 +0100
> From: "Daniel Jungmann" <DSJ### [at] gmxnet>
> Newsgroups: povray.unofficial.patches
> 
> Daniel made a patch, but he did not release it to public.  It uses some
> MS-Compiler specific things for implementation.  I recently contacted him
> on that, but i got no reply.
> 
> There was quite some discussion in this and some of the following threads
> on portability and other things so you might want to read it.
> 
> Christoph
> 
> --
> Christoph Hormann <chr### [at] gmxde>
> IsoWood include, radiosity tutorial, TransSkin and other
> things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Christoph Hormann
Subject: Re: optimizing / 3dnow
Date: 23 May 2001 14:26:57
Message: <3B0C0119.47CB2490@gmx.de>
josh wrote:
> 
> hmm, thanks.
> I would look at that except time seems to have started in february, no
> matter how much I argue with netscape.

You should check 
Edit -> Preferences -> Mail&Newsgroups -> Disk Space 
and try reloading afterwards.

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

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