At 09:28 PM 8/25/00 +0200, Bart Lateur wrote:
>On Fri, 25 Aug 2000 12:19:24 -0400, Dan Sugalski wrote:
>
> >Code you don't call won't eat up any cache space, nor crowd
> >out some other code. And if you do call it, well, it ought to be in the 
> cache.
>
>Probably a stupid question... But can't you group the code for the most
>often used constructs? So that, if one of those things is loaded in the
>cache, the others are in there with it?

Sure, and as Nick's already said, perl 5 did that. How much of a win 
grouping is depends on the chunks fetched into cache. Data usually goes 
into the processor cache in small pieces--8 or 16 bytes at a time. The 
off-chip cache usually is loaded in larger pieces, but the size of those 
depends on the processor you're talking about.

Given the size of many of perl 5's opcode functions, I'm not sure 
grouping's really a win for code. That may change some for perl 6, though.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to