Re: Java's performance far better that optimized C++

From: Dietmar Kuehl (dietmar_kuehl_at_yahoo.com)
Date: 06/18/04


Date: 18 Jun 2004 15:07:21 GMT

valentin tihomirov wrote:
>> Have a look at the algorithms in the
>> standard C++ library to get an idea what I'm talking off. For a more
>> intriguing example, have a look at the Boost Graph Library (see
>> <http://www.boost.org/>). Stuff like this is impossible on the basis of
>> Java generics.
>
> Could you please refer me to hash_set demo example? I understand, I will
> need to define some hash-code generator and equality comparitor. The
> structure to be stored has an integer field, retreiving an element by
> integer will be needed.

Apparently you do not understand what these libraries are all about (no
offense here: many people fail to see what Generic Programming is about):
the containers are just one part, the unimportant one. I don't know which
hash_set you are using (the standard library actually does not [yet] ship
with one) and I don't care too much about containers. The point is that
algorithms operate on all appropriate data structures, independent on
whether they come from the standard library, are user defined, or whatever.
Actually, it is even possible to use the algorithms with data structures
which were never intended to be used with the algorithms. The algorithms
in the standard C++ library are relatively simple but the same technique
can be applied to more complex algorithms like the graph algorithms from
the BGL.

-- 
<mailto:dietmar_kuehl@yahoo.com> <http://www.dietmar-kuehl.de/>
<http://www.contendix.com> - Software Development & Consulting


Relevant Pages

  • Re: Kitchen sink library
    ... maps and many other standard data structures and algorithms. ... There are many highly specialized libraries ...
    (comp.os.linux.development.apps)
  • Re: Anti-Aliasing / How to reconstruct a zoomed image
    ... There are several open source image manipulation libraries. ... Check the available resizing algorithms here: ... Note that most graphics libraries are ... Some algorithms may add incorrect details, ...
    (comp.protocols.dicom)
  • Re: complexity of numerical software
    ... They have nothing to do with algorithms to find subsets, which I would classify with discrete or combinatorics algorithms. ... In the "new" system there will be numerical programs using the well tested basic libraries. ... hence the precision is very limited for a CAS. ... I have already used Maple, Mathematica and MuPAD, and then I discovered GAP: ...
    (sci.math.symbolic)
  • REPOST: Re: TrueCrypt 4.0 Out
    ... What libraries in the OSS world do you contribute to? ... >> used a crypto library which provides the algorithms they need in a well ... tell me why they picked non-standard algorithms? ... > had to be designed and implemented with the same calling interfaces. ...
    (sci.crypt)
  • Re: TrueCrypt 4.0 Out
    ... What libraries in the OSS world do you contribute to? ... >> used a crypto library which provides the algorithms they need in a well ... tell me why they picked non-standard algorithms? ... > had to be designed and implemented with the same calling interfaces. ...
    (sci.crypt)

Loading