1. Speed measuring (was: Re: Open source Euphoria)

>Well, ignoring the fact that Euphoria is not compiled, but interpreted,
>we also have to decide what we mean by faster: Do we want faster program
>design, faster coding, faster compile time, or faster run time?


Program design doesnt happen behind a computer and is not bound to a
programming language (it involves choosing the appropiate programming
language)

And as to speed, there is no answer.
In theory everything in Euphoria could be machine code, as well as in C.
In theory you could *always* match upto C or machine code and visa versa, to
speed. However to get a speedy dynamic memory allocation you need to move
more ground than in Euphoria. Visa versa to have a program that XOR's the
bytes in a file, and then writes it out again, will be as simple, but much
more faster in C.

So, first you choose the problem you wish to program a solution for, then
you choose the appropiate language based upon the speed you need, and the
effort you need to gain that speed.

>But does it matter? If I'm writing a game, probably yes.

The difficult part of a program is not (and should not be) speed.
After the right tools are made (fast graphics engine) Euphoria is perfect to
base a game on. First of all, the game is stable, easily changed, and
updated (easier development, means more freedom in program design) and
secondly, things like AI is easily coded in Euphoria, and will be extremely
fast, because they use the advantages that Euphoria offers. To gain the same
speed for such flexible and extended AI, you would need to apply all the
tweaks and tricks that Robert did. For each game again. While such low-level
things like graphics engines and sound systems, last, and can be used for
all games, and thus the effort of tweaking them, and writing machine code
pays off.

>But most programs spend their time waiting for user input anyway; for them,
>execution speed isn't very important.


Completely true. Weird though, if you spent too much time with windhoos, you
would think waiting for user input is an extrmeley heavy task for your
computer

Ralf

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu