1. About atom memories

I tried this program:

object x
for i = 1024*1024 to 1000000000000000000000 by 1024*1024 do
    x = repeat(i+111111111.111111111111111111111111111111111, i)
    ? i
    printf(1, "%20.20f\n", x[i])
    x = getc(0)
end for

after i = 10MB, I saw the memory usage (using TaskInfo2000),
it was 41376 KB ~~ 40.4 MB

So one atom just use 4 bytes, not 8 bytes?
And the precision is still 16 digits!
(I get 121596871.11111110000000000000 at the last line)

If it's like that, EU is better that I thought!

new topic     » topic index » view message » categorize

2. Re: About atom memories

Aku writes:
> object x
> for i = 1024*1024 to 1000000000000000000000 by 1024*1024 do
>    x = repeat(i+111111111.111111111111111111111111111111111, i)
>    ? i
>    printf(1, "%20.20f\n", x[i])
>    x = getc(0)
> end for
>
> after i = 10MB, I saw the memory usage (using TaskInfo2000),
> it was 41376 KB ~~ 40.4 MB
>
> So one atom just use 4 bytes, not 8 bytes?
> And the precision is still 16 digits!

When i is 10 million, x will have 10 million 4-byte pointers to
a single floating-point value.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu