🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.borland
Article #173

Re: Fibonacci Numbers program problem

#173
From: Palinkas Tibor
Date: Fri, 11 Aug 2000 00:00
32 lines
2557 bytes

On Thu, 10 Aug 2000, Dr John Stockton wrote:

> 
> Speed is not everything; understanding and correctness are more
> important.
> 
> Where a method is defined in a recursive manner, it is better to program
> it recursively, and then to seek improvement if necessary; if the
> iterative result does not agree with the recursive, one can be sure that
> something is wrong.

Well, it is like a microsoft programmer would say... Ayway you are right,
if this code is an example in education. But if you write real programs,
speed should be important. Never forget: to write a better code should be
much more easy and effective than to develope new hardwaer just to run the
code. If you want to make a real program, never write long and slow codes
thinking that "the people who use it will buy a faster computer" because
this is not programming i think...

Anyway there aer ways to make faster te code without rewriteing, with
caches and other tricks, but i think that wouldn't solve the problem as
good as a better code would. For example virtual memory under an os: it's
nice to use only standard file handling functions and wait for the OS to
decide what to cache in memory and what not, but i think the OS knows less
about the problem than the program, so maybe if the program would choose
what should go to memory and what to a file, it would be faster. The same
about caches i think.

Anyway these are only my opinions, and i'm not a real programmer, i mean
ot with degree or something. 
Technical Details
Message-ID: <Pine.GSO.4.21.0008111047560.2122-100000@ural2>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <EZKj5.95$S96.740@news-server.bigpond.net.au> <MPG.13fa0aec45dda57698970f@news.primenet.com> <8ms9f2$jfg$1@kruuna.Helsinki.FI> <xAWw8HAhApk5EwqQ@merlyn.demon.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111659,99aae379fca00543
X-Google-Attributes: gid111659,public
X-Google-Thread: 10cc59,99aae379fca00543
X-Google-Attributes: gid10cc59,public
X-Google-Thread: 108ebd,99aae379fca00543
X-Google-Attributes: gid108ebd,public
From: Palinkas Tibor <pt131@hszk.bme.hu>
Subject: Re: Fibonacci Numbers program problem
Date: 2000/08/11
Message-ID: <Pine.GSO.4.21.0008111047560.2122-100000@ural2>
X-Deja-AN: 657088833
References: <EZKj5.95$S96.740@news-server.bigpond.net.au> <MPG.13fa0aec45dda57698970f@news.primenet.com> <8ms9f2$jfg$1@kruuna.Helsinki.FI> <xAWw8HAhApk5EwqQ@merlyn.demon.co.uk>
X-Sender: pt131@ural2
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: abuse@news.bme.hu
X-Trace: goliat.eik.bme.hu 965984167 11740 152.66.130.2 (11 Aug 2000 08:56:07 GMT)
Organization: Technical University of Budapest
Mime-Version: 1.0
NNTP-Posting-Date: 11 Aug 2000 08:56:07 GMT
Newsgroups: comp.lang.pascal.borland,comp.lang.pascal,borland.public.turbopascal