On Jul 13, 2007, at 5:24 AM, SainTiss wrote:

> Apparently, by default, global method caching is enabled, while  
> inline caching
> is disabled in pepsi.
>
> Are they supposed to be mutually exclusive?

No.  They can be enabled/disabled independently.  All four  
combinations should work.  (At least that's the intention.)

> Are there scenario's where one is
> better than the other, or where they actually work well together?

The inline caches speed up code by 70% (run times reduced by a factor  
of 1.72) on my machine, compared to using only the global method  
cache.  The price is that they increase the size of the compiled code  
considerably.  There are probably situations in which the increased  
pressure on the low-level caches negates the performance benefit from  
avoiding a global method cache probe (which costs a function call) at  
each send site.

If the global cache is enabled then it is used to fill the inline  
caches when they miss.  If not enabled, inline cache miss causes a  
full lookup through the vtables to fill the cache.

If you run idc with -Op then it will enabled inline caches just for  
that one file, so you can tune where you want to trade more space for  
more speed at the granularity of the source file.  (I could probably,  
with sustained coercion, be persuaded to add a pragma to enable  
inline caches at the granularity of source lines.)

Hope that helps.

Cheers,
Ian


> A liberal is a person whose interests aren't at stake at the moment
>   -- Willis Player

The business of Progressives is to go on making mistakes.  The  
business of Conservatives is to prevent mistakes from being corrected.
   -- G. K. Chesterton

_______________________________________________
fonc mailing list
[email protected]
http://vpri.org/mailman/listinfo/fonc

Reply via email to