Cracking DES with C++ is faster than Java?

Discussion in 'C++' started by Julie, Apr 25, 2004.

  1. And they are wrong.

    Explicit memory management is provably optimal - it performs the
    minimum number of operations required to achieve the result.

    In operation, systemic GC wastes effort processing memory which the
    programmer knows is in use and would therefore not be touched if
    explicitly managed.

    With loads of help from the compiler, automatic management can be
    tailored to the needs of the individual application. Such tailored
    systems can sometimes closely approximate explicit management -
    however, they are still largely experimental and the best they could
    hope to do would be to equal explicit management.

    This is not a criticism of GC ... it's just a statement of fact. I
    believe automatic memory management is a Good Thing (TM) - but the
    safety and convenience it offers comes with a price.

    This is only true of the most naive implementations. The simple
    stuff you see in introductory algorithm books is almost never used in
    practice - even the most heavily criticized real implementations have
    long been case optimized for typical usage patterns and are far more
    complex than the books would have you believe.

    There are many excellent heap management algorithms available which
    minimize processing time and fragmentation. Take a look at allocators
    designed for real time use.

    This is only true of moving (ie. copying and/or compacting)
    collectors. Non moving collectors have exactly the same allocation
    search problems as do explicitly managed heaps.

    Of late, copying collectors have fallen out of favor for all but the
    first generation nursery, where objects tends to die quickly. Modern
    generational systems have tended toward non moving collectors for
    tenured storage.

    I suggest you spend some quality time reading about how memory
    management really works. A good technology overview can be found in
    "Garbage Collection: Algorithms for Dynamic Memory Management",
    Richard Jones & Rafael Lins, 1997, Wiley & Sons, Ltd., ISBN
    0-471-94148-4. Beyond that there are many papers available on the
    current state of the art.

    George Neuner, Jun 6, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.