--Apple-Mail-7--618298065
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed

On 08 Apr 2005, at 03:39, Lothar Scholz wrote:

> ---------------------------
> In a typical system it often turns out that the same message is sent 
> to instances of the
> same class again and again; consider how often we use arrays of 
> SmallInteger or
> Character or String. To improve average performance, the VM can cache 
> the
> found method. If the same combination of the method and the receiver's 
> class are
> found in the cache, we avoid a repeat of the full search of the 
> MethodDictionary
> chain. See the method Interpreter > lookupInMethodCacheSel:class:
> for the implementation.
> VisualWorks and some other commercial Smalltalks use inline cacheing, 
> whereby the
> cached target and some checking information is included inline with 
> the dynamically
> translated methods. Although more efficient, it is more complex and 
> has strong
> interactions with the details of the cpu instruction and data caches.
> ---------------------------
>
> So message dispatching with squeak is not much more efficent then what
> i expect from YARV, a simple bytecode dispatcher with dynamic method
> lookup tables and a small lookup cache.

You missed the second to last sentence, "... the cached target and some 
checking information is included inline with the dynamically translated 
methods."

This can be a big boost because you don't need to look up the method or 
even dispatch to it anymore, its right there where it needs to be.

-- 
Eric Hodel - drbrain / segment7.net - http://segment7.net
FEC2 57F1 D465 EB15 5D6E  7C11 332A 551C 796C 9F04

--Apple-Mail-7--618298065
content-type: application/pgp-signature; x-mac-type=70674453;
	nameP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iEYEARECAAYFAkJWu5QACgkQMypVHHlsnwTz0ACfbai5bqQ61K8B5DjD8ZBD15jE
TRYAoOPZdKjLMOJD3ZO7WAso9aE74a1X
fW
-----END PGP SIGNATURE-----

--Apple-Mail-7--618298065--