POV-Ray : Newsgroups : povray.unofficial.patches : PovRay faster Server Time
1 Sep 2024 22:14:13 EDT (-0400)
  PovRay faster (Message 70 to 79 of 89)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Rk
Subject: Re: PovRay faster
Date: 2 Feb 2001 03:23:48
Message: <3a7a6e94$1@news.povray.org>
Here's some useful links for 3dNow! optimization:

Part 1 of the tutorial:
http://www.amdzone.com/articleview.cfm?articleID=282

Part 2 of the tutorial:
http://www.pcstats.com/articleview.cfm?articleID=354

Microsoft provides an MSVC++ 6 processor pack for 3DNow:
http://msdn.microsoft.com/vstudio/downloads/ppack/download.asp

Cheers
Rk


Post a reply to this message

From: Daniel Jungmann
Subject: Re: PovRay faster
Date: 2 Feb 2001 08:14:43
Message: <3a7ab2c3@news.povray.org>
> Microsoft provides an MSVC++ 6 processor pack for 3DNow:
> http://msdn.microsoft.com/vstudio/downloads/ppack/download.asp

The MSVC++ 6.0 processor pack works and now I use it.


Post a reply to this message

From: Peter J  Holzer
Subject: Re: PovRay faster
Date: 3 Feb 2001 18:02:13
Message: <slrn97p19e.fh7.hjp-usenet@teal.h.hjp.at>
On 2001-02-01 10:18, Warp <war### [at] tagpovrayorg> wrote:
>Peter J. Holzer <hjp### [at] sikituwsracat> wrote:
>: a dll with the time critical routines
>
>  What do you mean "a dll"?
>  How do you use dll's with *STANDARD* C (or C++)?

You don't have to for two reasons:

1) Creating and using a DLL is normally done with special options to the
    linker. No change to the source code is necessary, unless you need
    to decide at run time which DLL you want to load, which isn't
    necessary in this case. The compilation and linking process is
    system dependent anyway, so an additional flag for the linker won't
    hurt.

2) The optimizations Daniel are talking about are extremely system
    dependent anyway. If you start replacing major parts of the source
    code with inline assembly which will only compile with a certain
    compiler and run on a certain platform, adding a bit of code which
    handles loading a shared library on that platform (should it really
    be necessary. which I doubt) is the least of your worries.

>  Don't forget that povray has to be compiled for several platforms. Also
>for Linux (I don't think that Linux supports Windows DLL's),

No, it hasn't windows EXE files either, so why should it have Windows
DLLs? It has its own scheme for shared libraries.

In fact I am using povray on Linux (and sometimes HP-UX and Solaris),
not Windows.

	hp

-- 
   _  | Peter J. Holzer    | All Linux applications run on Solaris,
|_|_) | Sysadmin WSR       | which is our implementation of Linux.
| |   | hjp### [at] wsracat      | 
__/   | http://www.hjp.at/ |	-- Scott McNealy, Dec. 2000


Post a reply to this message

From: Alessandro Coppo
Subject: Re: PovRay faster
Date: 4 Feb 2001 03:26:56
Message: <3a7d1250@news.povray.org>
On Windows you have the LoadLibrary/GetProcAddress/FreeLibrary calls. On
Linux you have almost identical calls (dlopen and friends). I have no
experience of other OSes, but I think things cannot be much different. In a
future version of my open source C++ library (CXL, you can find it on my
site) I plan to create a wrapper for these things making them transparent to
handle either on Windows and on Linux

Just as an example, if you look at CXL-3patch1 sources, you will find that I
have a HiResTimer class which is implemented in two completely different
ways on Windows and on Linux, but when use it you write EXACTLY the same
code (and you have almost exactly the same results).

Creating a DLL requires some macro support for code (EXPORTS etc. you can
even make the source capable of being compiled into an app/lib or dll
TRANSPARENTLY) some linker options and a runtime loading mechanism (provided
by any modern OS,  EVEN Windows has it!!!).

Alessandro Coppo
a.c### [at] iolit
www.geocities.com/alexcoppo


Post a reply to this message

From: Daniel Jungmann
Subject: Re: PovRay faster
Date: 4 Feb 2001 05:56:41
Message: <3a7d3569@news.povray.org>
I think the discussion was not helpful. There are a some things which can be
optimized without any quality lost. The general things are platform
independent, the processor independent things can be put in separate source
files. PovRay would check the processor and the supported instructions (MMX,
3D!Now, SSE etc.) and the required instructions are not available PovRay
shows a message and show you where you can get the right version for your
processor. Here are a short list of things which can be optimized :

single precision which can be optimized using 3D!Now or SSE

1) Lightning
2) Mesh

general things which can be optimized

1) loops
2) float divisions (replace mutiple divisions with one division and
multiplications)
3) if then / ? :
4) integer multiplications and divisions (replace them with shift or
additions)
5) multiple integer calculations

integer arithmetic which can be otimized using MMX

1) every time multiple integers are calculate

other things which can be optimized using 3D!Now, MMX, SSE etc.

1) mathematical functions, e.g. sin, cos, tan, exp, sqr, sqrt, division etc.
2) ? :


Post a reply to this message

From: Francois Labreque
Subject: Re: PovRay faster
Date: 4 Feb 2001 09:09:39
Message: <3A7D61E8.7AC8AA0C@videotron.ca>
Daniel Jungmann wrote:
> 
> general things which can be optimized
> 
> 3) if then / ? :

Apart from "looking cooler", is there any benefit to using the ternary
operator?  Is it really faster than an "if then else" statement?  I was
under the impression that most compilers would produce identical code
underneath.

-- 
Francois Labreque | The surest sign of the existence of extra-
    flabreque     | terrestrial intelligence is that they never
        @         | bothered to come down here and visit us!
  videotron.ca                                  - Calvin


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: PovRay faster
Date: 4 Feb 2001 09:50:27
Message: <3a7d6c33@news.povray.org>
In article <3a7d3569@news.povray.org> , "Daniel Jungmann" <DSJ### [at] gmxnet> 
wrote:

> general things which can be optimized
>
> 1) loops
> 2) float divisions (replace mutiple divisions with one division and
> multiplications)
> 3) if then / ? :
> 4) integer multiplications and divisions (replace them with shift or
> additions)
> 5) multiple integer calculations

It is a complete waste of time to optimize these by hand.  Every compiler
can do a much better job on these and the code stays readable on your site!

If you want to seriously speed up POV-Ray, look into the intersection
algorithms and find ways how to reduce the number of intersections further.
Bounding boxes are a start, but maybe there are additional algorithms?


     Thorsten


Post a reply to this message

From: Daniel Jungmann
Subject: Re: PovRay faster
Date: 4 Feb 2001 10:54:58
Message: <3a7d7b52$1@news.povray.org>
I don't know, I just mean "if then" and "? :", not replace "if then" with "?
:".


Post a reply to this message

From: Daniel Jungmann
Subject: Re: PovRay faster
Date: 4 Feb 2001 11:05:19
Message: <3a7d7dbf@news.povray.org>
> It is a complete waste of time to optimize these by hand.  Every compiler
> can do a much better job on these and the code stays readable on your
site!
>
> If you want to seriously speed up POV-Ray, look into the intersection
> algorithms and find ways how to reduce the number of intersections
further.
> Bounding boxes are a start, but maybe there are additional algorithms?
>
>
>      Thorsten

Which compiler does these things?


Post a reply to this message

From: Ken
Subject: Re: PovRay faster
Date: 4 Feb 2001 11:07:42
Message: <3A7D7EEB.974E7C5C@pacbell.net>
Daniel Jungmann wrote:
> 
> > It is a complete waste of time to optimize these by hand.  Every compiler
> > can do a much better job on these and the code stays readable on your
> site!
> >
> > If you want to seriously speed up POV-Ray, look into the intersection
> > algorithms and find ways how to reduce the number of intersections
> further.
> > Bounding boxes are a start, but maybe there are additional algorithms?
> >
> >
> >      Thorsten
> 
> Which compiler does these things?

Compilers do not do these things. Programmers do.

-- 
Ken Tyler


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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