POV-Ray : Newsgroups : povray.advanced-users : Array irritation. : Re: Array irritation. Server Time
30 Jul 2024 04:16:41 EDT (-0400)
  Re: Array irritation.  
From: Ron Parker
Date: 19 Oct 2000 09:14:22
Message: <slrn8utstf.2pq.ron.parker@fwi.com>
On 19 Oct 2000 03:59:13 -0400, Warp wrote:
>Thorsten Froehlich <tho### [at] trfde> wrote:
>: Maybe it is optimising, but in a different way than you expect. On the one
>: hand "i" might be needed somewhere else and inc i could only work on
>: register variables (sorry, I don't know x86 assembler too well).
>
>  The 'inc' instruction works also directly with memory locations
>(ie. variables) but is slower than an 'inc' on a register. But of course
>loading the variable first on a register, incrementing the register and
>then storing the register on the variable is not faster (it's actually slower,
>I think).

It might pipeline better.

>  And besides, if it's not optimizing (as the original poster said), it
>should generate the simplest code, not the fastest.

If it's not optimizing, it's not checking to see whether the result of
the calculation is used, so it always computes it.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

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