From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!cme!leake From: leake@cme.nbs.gov (Stephe Leake) Newsgroups: comp.lang.ada Subject: Re: Garbage Collection Message-ID: <792@marvin.cme.nbs.gov> Date: 14 Dec 88 17:16:06 GMT References: <6702@june.cs.washington.edu> <3861@hubcap.UUCP> <6713@june.cs.washington.edu> Organization: National Institute of Standards & Technology, Gaithersburg, MD In-reply-to: klaiber@june.cs.washington.edu's message of 13 Dec 88 23:36:44 GMT List-Id: In article <6713@june.cs.washington.edu> klaiber@june.cs.washington.edu (Alexander Klaiber) writes: Clearly, there is a tradeoff between readability and efficiency. In my version, I reduce efficiency by requiring garbage collection (although there exist rather powerful and fast GC algorithms). Your proposal would definitely increase the complexity of the program and, due to the overhead of a DB-lookup, might actually run slower than the version with GC --- depending on circumstances such as frequency of lookups in the database, size of the database (your program) vs. time required for GC, amount of garbage produced etc. (my program). You are not reducing the complexity of the program; you are merely hiding it in the vendor-supplied memory management package. If the program is written correctly, the complexity can be hidden in a user-supplied memory management package. Then there is no difference in the readability of the application code, and the programmer has the chance to tailor the garbage collection algorithm to the application. Since there are many garbage collection algorithms (each posting here seems to mention another one), it is clear that each will be suited to certain applications. Better to require the programmer to choose the algorithm, than to be tempted to "live with" the single vendor supplied one. There is no way the vendor can take into account the trade-offs you mention, but you can! Stephe Leake (301) 975-3431 leake@cme.nbs.gov National Institute of Standards and Technology (formerly National Bureau of Standards) Rm. B-124, Bldg. 220 Gaithersburg, MD 20899