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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3ccb707f4c91a5f2 X-Google-Attributes: gid103376,public From: lars.farm@ite.mh.se (Lars Farm) Subject: Re: Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Date: 1996/10/31 Message-ID: <19961031103614491013@dialup122-5-3.swipnet.se>#1/1 X-Deja-AN: 193393801 references: <01bbb57f$7fb59020$72663389@billn.logicon.com> <325BC3B3.41C6@hso.link.com> <325D7F9B.2A8B@gte.net> <325FF8D0.6660@io.com> <554c5d$4ag@nntpa.cb.lucent.com> <32776D5D.5768@gsfc.nasa.gov> organization: pv nntp-posting-user: s-49817 newsgroups: comp.lang.ada Date: 1996-10-31T00:00:00+00:00 List-Id: Stephen Leake wrote: > If Icon is assigning pointers, and Ada is copying values, these are NOT > comparable benchmarks! To get a real comparison, the semantics must > match. The point of GC is that it allows simpler, but still correct solutions. Simpler sometimes means faster too. Most are well aware that collecting garbage takes time. "GC is slow". Most ignore that with GC the need to copy datastructures is smaller. Less copying means faster. As long as reference counting is there to know when to release data, there is no need for reference counts. FWIW I tried the benchmark in c++ on a PowerPC 604/120, a PowerMac 8500. I used the standard string class (refcounted) and Boehms GC + his string wrapped in a string class similar to the stdlib string. - refcounted std string: 2.8 s - Boehms GC and string: 0.4 s including 32 garbage collections I don't know how Icon or Ada strings are implemented. I don't know what kind of GC Icon uses. Still the results are similar. Boehms strings concatenate and assign fast (pointers only) and copy on substring extraction (once per iteration). The standard string class copies on concatenation and substring extraction, but increments a referece count on assignment. -- Lars Farm, lars.farm@ite.mh.se