classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] Patch: Opening RandomAccessFiles requires excessive per


From: Christian Thalinger
Subject: Re: [cp-patches] Patch: Opening RandomAccessFiles requires excessive permission
Date: Tue, 06 Dec 2005 19:30:54 +0100

On Tue, 2005-12-06 at 10:00 -0600, Archie Cobbs wrote:
> That's getting into the micro-optimzation realm, which is
> fraught with danger and mistaken assumptions :-) E.g., on
> some machines the time overhead of setting up a try/catch in
> a method that wouldn't otherwise have one is higher than
> the single comparison required to test for null. In particular,
> any interpreter is going to have to test for null anyway,
> so the second time it's already in cache, blah blah, etc.

"...setting up a try/catch..."?  What do you mean?  Agreed on the
interpreter thing, but who does benchmarks on interpreters?

> 
> Not to mention that the space overhead of a try/catch (vs. none)
> will probably be higher too. So IMHO it's better to avoid
> too much of this kind of thing (unless it actually makes the
> source code clearer (don't think so in this case)).

Actually the generated code is smaller and i don't think there is too
much space overhead in the VM (at least not in CACAO).  Yes, the code is
not clearer but it's just a 6-liner in a core class... so it should be
understandable for everyone :-)

Whatever...

/me still trying to kick sun's ass

TWISTI





reply via email to

[Prev in Thread] Current Thread [Next in Thread]