Java vs C++ OOP conceptual question

From: Vendor Neutral (neutral_at_domain.invalid)
Date: 12/27/04


Date: Mon, 27 Dec 2004 18:15:01 GMT

My level: Jr Java programmer

I want to implement a class that uses a HashMap. There will be a
very small number of puts at class instantiation, with a huge number
of gets afterwards (the HashMap will support a membership search once
for every transaction, with 1000 transactions a second the sustained
rate I need to support).

Is there some difference (performance, concept, etc.) in implementing
this class as something that contains the HashMap, rather than
something that extends HashMap directly? As I consider the behavior
of this class, I'm not imagining anything that it needs to do other
than the set of HashMap operations. So I'm thinking I might gain
some slight performance benefit by extending HashMap rather than
wrapping the HashMap in a class that's really nothing more than a
blanket.



Relevant Pages

  • Re: Java vs C++ OOP conceptual question
    ... Oops: The "C++" part of the question is that I defined subclasses ... > I want to implement a class that uses a HashMap. ... > something that extends HashMap directly? ... > some slight performance benefit by extending HashMap rather than ...
    (comp.lang.java.help)
  • Re: Java vs C++ OOP conceptual question
    ... > I want to implement a class that uses a HashMap. ... > for every transaction, with 1000 transactions a second the sustained ... If those keys are fixed, ... and just use an array as the hash table. ...
    (comp.lang.java.help)