From: znmeb@... Date: 2006-07-02T10:43:07+09:00 Subject: Re: Huge performance gap Quoting Charles O Nutter : > An interpreter *is* an underlying abstract machine. Ruby and Java both have > interpreters that do basically the same thing. Java additionally has a JIT > compiler that takes code the next step toward native. Exactly! Now when Java first came about, the underlying hardware was fairly diverse and the designers of the Java runtime chose to implement an extra layer for the sake of portability. After all, they had to run on almost any flavor of OS, including some ancient models of Windows, Tru64, OS, ancient models of MacOs, Solaris, and IIRC the IBM mainframes as well. IIRC, Windows NT also ran on Alphas and MIPS back then. :) And to top it off, memories were smaller and machines were slower. A lot of those options don't make a lot of sense any more. The hardware is dominated by x86 and x86-64, with SPARC and PowerPC running well behind. There's Windows, there's Linux, there's Solaris and MacOS among the living, breathing operating systems. And there's GCC, Microsoft's compiler chain, perhaps a native Sun compiler, and a few specialized compilers. "Write once, run anywhere" doesn't have to worry about as many "anywheres" as it used to. :) So Java can afford a just-in-time compiler. But do they *need* an intermediate abstract machine? Probably not any more. It probably would cost them more to refactor around it than to leave it in place. But I think if they were designing Java today, there wouldn't need to be a JVM. Just putting on my statistician's hat, I'd say Ruby should have a JIT compiler for x86 and x86-64 built by the "Ruby community", that an extra abstract machine layer isn't necessary, and that only Windows, Linux and MacOS need a complete Ruby environment built and maintained by the "Ruby community". Just about anything more might make sense to do if some business thought they could make a profit from the effort, but I don't see it as a viable community project.