J64C wrote:
Hey guys!
I was wondering, assuming the perfect circuit, bottlenecks, overclocking and all that stuff aside - Would a dual 6502 setup perform faster at say 5MHz a piece, than a single 10MHz 6502?
If only it worked like that ...
You'd need to write your code to utilise both (or more) CPUs - and that's a topic that's been thought about for decades now. Code doesn't magically "just work" when you throw multiple CPUs at it - and some problems work better than others.
I was working for a supercomputer company in the late 80's/early 90's and the usual question we got: I have this 30 year old FORTRAN program: Make it go faster. ... So we ended up doing the hard work of parallelising it, re-writing it and so on. Mostly if they used standard libraries then we'd just link in our version of that library to get the speed-up they wanted, but sometimes that didn't work and the program needed a re-think...
Problems with the same data set often do work well - take ray tracing (or Mandelbrot) for an example - to generate each point in the final image you need to look at the whole 'scene' - if you have one CPU per pixel then you get a great speed-up, but then your problem becomes one of data-flow - getting the data into and out of each CPU fast enough.
(and you may be surprised at just how many problems look like ray tracing in certain fields... Modelling tiny droplets of ink from an ink-jet printer, or a nuclear bomb exploding, nanosecond by nanosecond...)
So it's not just a matter of throwing CPUs at a problem, often the problem has to be re-designed.
It's a fascinating subject though - today we have far better tools and program analysers that we had 30 years back too.
Thinking what we might be able to do with a multiple CPU 6502 system - well, it's purely academic and/or a great hobby project in terms of compute capacity compared to the processing power in a modern smartwatch, but some things are possible for a demonstration - parallel quicksort, even mandelbrot and other fractals which are visually nice or even "the game of life", but making the action of 'copy a file' go faster? tricky ...
Cheers,
-Gordon
_________________
--
Gordon Henderson.
See my
Ruby 6502 and 65816 SBC projects here:
https://projects.drogon.net/ruby/