Logo by AGUS - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit us on facebook
 
*
Welcome, Guest. Please login or register. October 02, 2018, 07:58:20 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: 1 2 3 [4]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Bigger Newton's fractals  (Read 3359 times)
0 Members and 1 Guest are viewing this topic.
HPDZ
Iterator
*
Posts: 157


WWW
« Reply #45 on: March 28, 2009, 12:48:05 AM »

memory accesses run into the thousands of cpu cycles these days, partly due to these things being massively speculative and superscalar; x86 performance programming has been all about caching and careful memory access since the pentium1.

I agree -- dealing with a cache miss can indeed take thousands of cycles, or more. If something's in the cache, the P-IV and Core2 CPUs can get at it with a throughput of 1 cycle usually. And many register-based instructions can achieve throughputs of more than 1 instruction per cycle.

Quote
anyway, no more speculation: these things can easily be measured. on something like a core 2 duo (and newer) you'll be really amazed at what you find  afro

Yes. I wish I had the time to do this! I'm sure it would be educational. I can say that my high-precision multiplication code runs significantly faster on my Core2 system than it does on my P-IV system, even without adjusting for the clock speed difference (2.4 GHz Core2 vs 3.2 GHz P-IV) so the more advanced architecture is definitely a major factor.

I guess the main point to reiterate is that most efforts for optimizing code for fractal generation should focus on the parts of the computation that involve transcendental operations. The number of such instructions should be minimized. Formula writers should be aware that multiplying, dividing, and especially performing exponentiation or transcendental operations on complex numbers is much more computationally intensive than doing the same operations on real numbers. Formula code shoudl be carefully structured their code to minimize such operations.

That said, due to the superscalar and highly cached architecture of modern CPUs (everything beyond 486-era units) many counterintuitive effects can arise in timings. A cache miss caused by an unfortunate, but well-intentioned, attempt to save an intermediate result can indeed cost more than re-doing the calculation. This was something I didn't think of in my earlier comments.

Interesting discussion.
Logged

Zoom deeply.
www.hpdz.net
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #46 on: March 29, 2009, 05:53:53 PM »

My take on this is that if your code is going to be around for a while then you should optimise based on likely improvements in processor technology.
The obvious thing is to support multi-threading.
But on a single thread if there's a choice between optimising using more memory (at least for data) and using more FPU power (transcendentals) then I'd normally go for the more memory option on the grounds that improvements in cache sizes and cache handling are more likely than improvements in the raw cycles required for transcendentals or indeed for improved FPU pipelining.
« Last Edit: March 29, 2009, 06:00:30 PM by David Makin » Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
HPDZ
Iterator
*
Posts: 157


WWW
« Reply #47 on: March 29, 2009, 07:52:36 PM »

My take on this is that if your code is going to be around for a while then you should optimise based on likely improvements in processor technology.
Predictions are tricky, especially when they're about the future....  smiley

Quote
The obvious thing is to support multi-threading.
Yes. Fortunately, most fractals are "embarrassingly parallel"-type problems that benefit greatly from multi-threading.

Quote
But on a single thread if there's a choice between optimising using more memory (at least for data) and using more FPU power (transcendentals) then I'd normally go for the more memory option on the grounds that improvements in cache sizes and cache handling are more likely than improvements in the raw cycles required for transcendentals or indeed for improved FPU pipelining.
Sadly, that last part about likely emphasis in future CPU engineering is probably true. Along the same lines, I have watched the MMX/SSE instruction set grow over the years and continue to remain frustrated that a few simple instructions that would be very useful for arbitrary-precision arithmetic have not been added. Similarly for the CUDA instructions in the GPUs (at least the last time I checked, about 6-8 months ago).
Logged

Zoom deeply.
www.hpdz.net
lycium
Fractal Supremo
*****
Posts: 1158



WWW
« Reply #48 on: March 30, 2009, 07:28:00 AM »

Predictions are tricky, especially when they're about the future.

niels bohr  afro

Yes. Fortunately, most fractals are "embarrassingly parallel"-type problems that benefit greatly from multi-threading.

if only the "most" part were true: for IFS fractal rendering, all bets are off since the computation is very "irregular".

Along the same lines, I have watched the MMX/SSE instruction set grow over the years and continue to remain frustrated that a few simple instructions that would be very useful for [...] have not been added.

yeah, intel royally messed up sse, and continue to do so in later revisions (with decreasing severity). then again, they aren't really known for their intelligent ISA designs wink
Logged

Pages: 1 2 3 [4]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Animated Newton fractals Movies Showcase (Rate My Movie) lkmitch 2 970 Last post January 26, 2009, 04:59:30 AM
by HPDZ
drawing Apollonian Gasket - newton method fractals Help & Support amirkhabbaz 4 1666 Last post December 23, 2010, 09:08:07 PM
by amirkhabbaz
3D Newton fractals 3D Fractal Generation JosLeys 9 2726 Last post March 17, 2011, 05:49:31 PM
by DarkBeam
Newton's Snowflakes Images Showcase (Rate My Fractal) Ilionstar 0 346 Last post January 15, 2012, 08:59:12 PM
by Ilionstar
Actual 3D newton fractals (new) Theories & Research « 1 2 » Kabuto 19 739 Last post January 22, 2013, 01:04:53 AM
by Pauldelbrot

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.143 seconds with 23 queries. (Pretty URLs adds 0.012s, 2q)