POV-Ray : Newsgroups : povray.off-topic : Who was looking for message-passing OS examples? : Re: Singularity Server Time
7 Sep 2024 11:22:16 EDT (-0400)
  Re: Singularity  
From: Darren New
Date: 13 Aug 2008 15:52:23
Message: <48a33b77$1@news.povray.org>
Warp wrote:
>   I have really hard time believing that if you, for example, calculate
> the sum of all the integers in an array, adding boundary checks to every
> single read operation will add only 4% of overhead.

The compiler can be pretty smart. You can actually optimize out the 
bounds checking most of the time.

int x[50]; int y;
for (i = 0; i < 50; i++) x[i] = i;
for (i = 0; i < 50; i++) y += x[i];

That won't have any bounds-checking code included.

-- 
Darren New / San Diego, CA, USA (PST)
  Ever notice how people in a zombie movie never already know how to
  kill zombies? Ask 100 random people in America how to kill someone
  who has reanimated from the dead in a secret viral weapons lab,
  and how many do you think already know you need a head-shot?


Post a reply to this message

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