M. Edward (Ed) Borasky wrote:
Wilson Bilkovich wrote:
Also, given that
by far the largest target platform is x86, and it has a tiny number of
gprs, you're going to be doing a lot of shuffling anyway. Why not let
a compiler handle that for you, since they spend all day, every day,
working on making it good at that task?Actually, though, if you have a look at Software optimization resources. C++ and assembly. Windows, Linux, BSD, Mac OS X, you'll see that not only is the *compiler* working hard to do that, so are those bazillions of transistors in the chip! Just because an 8088 only had half a dozen registers, none of which was truly general purpose, and needed an 8087 to do floating point computing, doesn't mean a Tulsa can't have hundreds or thousands of threads' worth of copies of the 8087 and 8088.
So why not have a Ruby inner interpreter that exploits the massive parallelism, concurrency and caching that's on the chip? In short, why should Sun, Microsoft and the open source community build the Ruby interpreters? Intel and AMD build their own compilers and math libraries, or contract them out -- why don't they build Ruby (and Perl and Python and PHP) interpreters too?
There's not a heck of a lot I can do about AMD, but I *am* in Intel's back yard.
Did I just propose that Ruby *keep* green threads and not move to using the OS threads?
···
--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/
If God had meant for carrots to be eaten cooked, He would have given rabbits fire.