At 07:23 PM 8/6/2001 -0400, Sam Tregar wrote:
>On Mon, 6 Aug 2001, Hong Zhang wrote:
>
> > It is not just for performance, the stack size and cache
> > locationality are also big issues.
>
>Cache sizes and timings vary from machine to machine.  Maybe we should
>make it configurable at compile-time?  If we do that then there's no
>reason to try to guess at the right number now - we can test later and get
>an answer we can trust.

No, he's right. Not dirtying cache lines is pretty much always faster than 
dirtying them, and not twiddling with memory's faster than twiddling. And 
unfortunately we can't really do fully platform-dependent code, since it'll 
be the actual bytecode that'll ned to be different.

>[ insert routine comment about premature optimzation causing the death of
>   the dinasours here ]

That's got to be one of the most overused comments. Unfortunately one of 
the least heeded, too.

We're actually doing the appropriate amount of optimization here. When 
dealing with low-level constructs it's appropriate to consider low-level 
effects and algorithms that handle low-level machinery. We aren't, 
unfortunately, going to get it optimal on all platforms, since that's just 
not possible with semi-generic code. We can reach an adequate compromise, 
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