1. Re: Optimizatin (was Edom 2.02)

The first program that I wrote in Euphoria was a starfield.
First, I had tried to store the data as different series --
the star's X coordinate in one series, and the stars Y
coordinate in another.  I did have it do much of the math
as operations of atoms on sequences.  But when I tried to
more efficient, simplify the math to fewer expressions, which
were all sequence upon sequence, it bogged down.  I had replaced
the seperate point data with one series i.e.: {{0,0},{2,2},etc...}
with each smaller sequence representing a point.  I don't know
if I just ran out of memory (I only have 640K) but it ran
a lot slower.  I wonder about the memory because it resorted to disk.
Which also doesn't make sense.  Robert -- Do multidimensional
sequences take up a lot of memory as overhead?  And how about
a built in function that could return the first element of a series?
ie:  FirstEl({{1,2},{2,3},{{1,2},3}={1,2,{1,2}}.  I could write
something like that in Euphoria but there would be no speed benefit.  I suppose
I could probably write something like that in assembly if I knew (and
understood) how sequences were stored.  Either way it seems like, for small
systems at least, avoiding multidemsional sequences is more efficient.
                          - the Doog


Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu