POV-Ray : Newsgroups : povray.off-topic : An interesting read : Re: An interesting read Server Time
28 Jul 2024 20:29:09 EDT (-0400)
  Re: An interesting read  
From: andrel
Date: 13 Jan 2014 17:31:48
Message: <52D4694C.2080506@gmail.com>
On 13-1-2014 23:04, Orchid Win7 v1 wrote:
> On 13/01/2014 09:36 PM, Francois Labreque wrote:
>> Le 2014-01-12 05:38, Orchid Win7 v1 a écrit :
>>>
>>> I don't have the book in front of me now, but prime number sieving is
>>> actually one of the examples. They even go so far as to remove the "stop
>>> searching after sqrt(max)" optimisation to "make the code simpler".
>>> Because most of the time, being able to understand the code is far more
>>> important than getting maximum performance out of it.
>>
>> If you do leave it in, *that* is worthy of a comment. Not every
>> programmer will be good enough with math to figure out why you don't
>> need to check for factors > sqrt(max).
>
> I agree. That's the sort of thing that's sufficiently non-obvious that
> it ought to be explained somewhere.
>
> Then again, how many programs sieve prime numbers? Most software seems
> to just push database records from A to B and back again...

Depends on your field of work ;) I don't.

-- 
Everytime the IT department forbids something that a researcher deems
necessary for her work there will be another hole in the firewall.


Post a reply to this message

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