From: Rick DeNatale Date: 2007-10-02T22:32:58+09:00 Subject: Re: question on bottleneck of ruby On 9/27/07, Clifford Heath wrote: > > The other performance factor (related to a different discussion) that > makes byte-code interpretation faster than AST-interpretation is that > with byte-code, you get much better locality of reference, so your > cache+memory system works much better. This is a *very* significant > factor that justifies some recent complaints. Depending on circumstances byte-codes can actually be faster than machine code. An example. Many years ago, Digitalk produced a Smalltalk implementation for PCs. They continually had to answer questions about the performance of byte-code interpretation. When they came out with a version 32-bit PCs they decided to expand everything to x86 machine code, so that they could say that their Smaltalk was compiled instead of interpreted. What they learned was that the machine code version actually ran slower due to locality of reference and paging. Of course tuning the performance of anything, and in particular a dynamic language implementation, is as much of an art as a science, and requires constant experimentation and willingness to overcome one's assumptions. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/