POV-Ray : Newsgroups : povray.binaries.programming : matrices.c : Re: matrices.c Server Time
17 Apr 2024 22:53:16 EDT (-0400)
  Re: matrices.c  
From: Jérôme Grimbert
Date: 27 Nov 2001 08:21:34
Message: <3C03934F.8CD9C3AC@atosorigin.com>
Tor Olav Kristensen wrote:
> 
> (from megasrc07.zip)
> 
> I have just had a little peek into that c-file
> and found that it might be possible to do some
> simplifications of the code within it.
> 
[SNIP]
> This introduces one extra local variable; omc,
> but I hope there will be a little speed gain anyway.

Do you have any idea WHEN Compute_Axis_Rotation_Transform is called ?
And how many time ?

My current guess is (because I did not check yet, 
only performing from memory of the code):
 - At parse time only.
 - once per invoking directive.

If you were trying to get some significant speed improvement, I'm afraid
you will be disappointed: it's in the wrong location, at the wrong time.


P.S.: If I am wrong, do not hesitate: Open fire... I will apologise later.

P.S.2: Smart compiler may already have factored 
the (1 - cosx) result in a register, so forcing to use a named variable
might even be counter productive (because it must be written to the memory
location, for nothing).


Post a reply to this message

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