Page **2** of **2**

### Re: Heavy calculations on nds original

Posted: **Sat Sep 24, 2011 12:04 am**

by **mtheall**

Yes, I noticed that the ARM9 will just continue if the ARM7 is not done yet; I just didn't mention it.

30 seconds to do 256x256 render at 3GHz!? Maybe you're trying to get too much detail. I actually tried this on ARM9-only and I can generate a decent-looking Mandelbrot in less than 5 seconds. Then I actually offloaded some of the work to the ARM7 (I offloaded varying amounts) and found that if I gave the ARM7 1/5 the amount of job I gave the ARM9 then they pretty much stayed in step with one another. However, the overall gain in performance wasn't even noticeable (they looked to be exactly the same speed). I will try again with more iterations to see if the performance difference shines through.

P.S. I batched the jobs into 256-pixels per job.

### Re: Heavy calculations on nds original

Posted: **Sat Sep 24, 2011 12:25 am**

by **mtheall**

I increased the number of iterations to 10000 and here are my results:

ARM9+ARM7: 34 seconds

ARM9 Only: 53 seconds

So I can say that there is significant advantage in offloading this type of workload to the ARM7, since the nature of it involves a lot of calculation and a small result set (relative to the amount of computation). This also means that you will be spending so much time calculating that the IPC overhead becomes negligible. So if you use a sufficiently high bailout limit, then it might make sense to send every job as one pixel. Normally, the NDS is not used for this type of application, and in most cases offloading work to the ARM7 is not worth the IPC overhead since games typically need a small timing window in order to keep fluidity, which is why we tend to steer users away from IPC usage.

### Re: Heavy calculations on nds original

Posted: **Sat Sep 24, 2011 10:55 am**

by **roelforg**

mthealll, you totally get it!

Later i wanna implement this to calculate

**pi** on an NDS!

The mandelbrot is actually an experiment to see how much time i can spare on calculations.

And it was a great success!

Now i'll implement the algorithm for pi and i can attempt to calculate

**pi**!!!

I'm not gonna save pi, just gonna see how much i can calculate.

The reason for not using a pc is that a pc uses to much power and produces to much heat, i'd need to leave the window open but then the rain comes in and breaks my pc (it wouldn't be the first time... but i closed the window just in time to save it

).

Thanx to all!

### Re: Heavy calculations on nds original

Posted: **Sat Sep 24, 2011 7:29 pm**

by **mtheall**

Now I think you've fallen off track. At least with the Mandelbrot set you could tweak the parameters and escape function to get different results which could be nicely displayed on a portable device. However, it still could be done on a much more powerful portable device without much risk of overheating.

But calculating pi is a whole new ballgame. Now you want to use algorithms that never change and always produce the same result and also which have been exercised very thoroughly to get millions of digits of pi. This type of task is more suited for a super computer and yields fairly useless results that exist somewhere else and are pointless to spend the time calculating. I don't understand why people like to waste their time calculating digits of pi. First, you need to come up with some way to perform multiplication and division on arbitrarily large numbers. Then, you will run out of memory before you become satisfied by the result. Not to mention it will take forever at 66MHz, when you could just as easily do it on a home PC at 2+GHz (x4 with a quad-core). You can throttle the amount of CPU used to avoid overheating and still come out WAY WAY WAY ahead.

Btw, it's really unnecessary to use so many smiley faces.

### Re: Heavy calculations on nds original

Posted: **Sun Sep 25, 2011 10:28 am**

by **roelforg**

Well...

I once did 1000000 digits on a standard (slow) desktop.

That pc takes 5 min to start firefox.

And i just wanna see how far i can optimize an already optimized algorithm.

It's just that i wanna see how strong my ds really is! (clockspeeds can say much, but i find seeing it much funnier!!!).

btw. I love smiley's.

### Re: Heavy calculations on nds original

Posted: **Sun Sep 25, 2011 7:36 pm**

by **mtheall**

My new fast desktop sometimes takes 5 minutes to load firefox, so I just never use firefox anymore.

Good luck trying to optimize an algorithm that's probably already as optimized as it can get. If you are some kind of optimization specialist that can improve it, then you can probably make a ton of money or get some award by showing it to people who use proper machines to do these sorts of calculations, because for those people (like many other people who have real goals), time is money.

### Re: Heavy calculations on nds original

Posted: **Mon Sep 26, 2011 5:47 am**

by **roelforg**

I've tried anyway and succeeded!!!

Oh, my other desktop which is way faster but not as fast as my 4e pc loads firefox in 10-20s.