Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.lang.java.programmer > #5076

Re: Managed-Code Bloat

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail
From BGB <cr88192@hotmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Managed-Code Bloat
Date Tue, 07 Jun 2011 16:04:47 -0700
Organization albasani.net
Lines 44
Message-ID <ismb0i$5m3$1@news.albasani.net> (permalink)
References <isht62$t08$1@lust.ihug.co.nz> <isis49$cpq$1@dont-email.me> <isjjl5$sm1$1@lust.ihug.co.nz> <isjobk$e3s$1@dont-email.me> <isjq2m$pb$1@lust.ihug.co.nz> <isjsa7$2j9$1@dont-email.me> <isjvee$3na$1@lust.ihug.co.nz> <isk4vu$baq$1@dont-email.me> <isk6l1$7nj$2@lust.ihug.co.nz> <isk71h$kso$1@dont-email.me> <iskmd5$anm$1@news.albasani.net> <isl3gb$nvl$1@lust.ihug.co.nz>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Trace news.albasani.net 7ZasE0H6kn7Lg7xGmGpoTDiJOC0XRaOkILKDi2Jn8fx+rbFmnyoxSaqp5NfK16APP0W3Con3qL2qsG2T3L7L+A==
NNTP-Posting-Date Tue, 7 Jun 2011 23:08:02 +0000 (UTC)
Injection-Info news.albasani.net; logging-data="+6+Jo24UyT3KnYR6LPs9CcFJo7YGc7l5BtGkb9L3amXIjHeeL7UayWhUUnFEccEsnXmD4V69rzO45WzRWTOIimSupXJ4zjKxyUnqfLLWtfC8lMlEFict2+bQiOTfB+Ba"; mail-complaints-to="abuse@albasani.net"
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10
In-Reply-To <isl3gb$nvl$1@lust.ihug.co.nz>
Cancel-Lock sha1:7RUwXT2d5oMavyJ9c2NlJ6ZP01c=
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5076

Show key headers only | View raw


On 6/7/2011 4:53 AM, Lawrence D'Oliveiro wrote:
> In message<iskmd5$anm$1@news.albasani.net>, BGB wrote:
>
>> delete can basically also allow a VM to free stuff early, and thus
>> potentially improve overall performance.
>
> Isn’t that conceding the point that automatic garbage collection saps
> performance?

I wasn't claiming it doesn't...


the merit of GC is that it can be easier to use, as it can serve as a 
"safety net" for all of those objects which fail to get freed correctly 
(or, rigged with some additional machinery, serve as a leak-detector and 
provide partial diagnosis...).

the downside though is, of course, that performance can be lost, and if 
the GC has to do its thing (GC cycles), this is not free either.

it depends though, as heavy use of RAII/Smart-Pointers and Pass-by-Copy, 
which is "common" in a lot of C++ code, can actually manage to be slower 
(a lot of C++ devs though use this in an attempt to reduce leaks without 
going through the more costly process of determining exactly when and 
where to free things as part of their code design, setting up "who owns 
what" policies, and so on...).


personally, I am just thinking here that GC + the ability to free things 
(basically, when one can determine for themselves when it is no longer 
needed) allows combining the good points (combining the relative ease of 
GC with a little more of the performance of manual MM).

I think Java just sort of left out delete due more to ideological 
reasons though, when instead they could have treated it like a hint (if 
the compiler or VM has good reason to doubt that the delete is valid, it 
can make it no-op and/or raise an exception if used incorrectly).

say, program crashes with an exception 
"java.lang.AccessFollowingDeleteError" or similar...


so, it is a tradeoff...

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Managed-Code Bloat Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-06-06 18:47 +1200
  Re: Managed-Code Bloat Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-06-06 06:40 -0300
    Re: Managed-Code Bloat Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-06-06 23:04 +1200
      Re: Managed-Code Bloat Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-06-06 17:41 -0300
        Re: Managed-Code Bloat Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-06-07 11:13 +1200
          Re: Managed-Code Bloat Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-06-07 07:08 -0300
      Re: Managed-Code Bloat Silvio <silvio@moc.com> - 2011-06-07 09:40 +0200
        Re: Managed-Code Bloat Patricia Shanahan <pats@acm.org> - 2011-06-07 06:08 -0700
  Re: Managed-Code Bloat Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-06 11:35 -0400
    Re: Managed-Code Bloat Alessio Stalla <alessiostalla@gmail.com> - 2011-06-06 10:47 -0700
      Re: Managed-Code Bloat Martin Gregorie <martin@address-in-sig.invalid> - 2011-06-06 18:21 +0000
        Re: Managed-Code Bloat Michael Wojcik <mwojcik@newsguy.com> - 2011-06-08 11:48 -0400
          Re: Managed-Code Bloat Martin Gregorie <martin@address-in-sig.invalid> - 2011-06-08 18:06 +0000
            Re: Managed-Code Bloat Michael Wojcik <mwojcik@newsguy.com> - 2011-06-11 14:00 -0400
      Re: Managed-Code Bloat Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-06-07 10:18 +1200
        Re: Managed-Code Bloat Michael Wojcik <mwojcik@newsguy.com> - 2011-06-08 11:59 -0400
      Re: Managed-Code Bloat Michael Wojcik <mwojcik@newsguy.com> - 2011-06-08 11:22 -0400
        Re: Managed-Code Bloat rossum <rossum48@coldmail.com> - 2011-06-08 21:45 +0100
    Re: Managed-Code Bloat Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-06-07 10:17 +1200
      Re: Managed-Code Bloat Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-06 16:37 -0700
        Re: Managed-Code Bloat Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-06-07 12:06 +1200
          Re: Managed-Code Bloat Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-06 17:44 -0700
            Re: Managed-Code Bloat Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-06-07 13:38 +1200
              Re: Managed-Code Bloat Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-06 20:13 -0700
                Re: Managed-Code Bloat Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-06-07 15:41 +1200
                Re: Managed-Code Bloat Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-06 20:47 -0700
                Re: Managed-Code Bloat BGB <cr88192@hotmail.com> - 2011-06-07 01:06 -0700
                Re: Managed-Code Bloat Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-06-07 23:53 +1200
                Re: Managed-Code Bloat BGB <cr88192@hotmail.com> - 2011-06-07 16:04 -0700
                Re: Managed-Code Bloat Michael Wojcik <mwojcik@newsguy.com> - 2011-06-08 13:04 -0400
                Re: Managed-Code Bloat Michal Kleczek <kleku75@gmail.com> - 2011-06-08 09:23 +0200
                Re: Managed-Code Bloat BGB <cr88192@hotmail.com> - 2011-06-08 03:54 -0700
                Re: Managed-Code Bloat bugbear <bugbear@trim_papermule.co.uk_trim> - 2011-06-07 10:10 +0100
                Re: Managed-Code Bloat BGB <cr88192@hotmail.com> - 2011-06-07 00:37 -0700
      Re: Managed-Code Bloat Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-06-07 07:31 -0300
        Re: Managed-Code Bloat BGB <cr88192@hotmail.com> - 2011-06-07 16:18 -0700
          Re: Managed-Code Bloat Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-06-07 20:50 -0300
          Re: Managed-Code Bloat Gene Wirchenko <genew@ocis.net> - 2011-06-08 07:53 -0700
            Re: Managed-Code Bloat BGB <cr88192@hotmail.com> - 2011-06-08 11:23 -0700
    Re: Managed-Code Bloat BGB <cr88192@hotmail.com> - 2011-06-06 16:54 -0700
  Re: Managed-Code Bloat Roedy Green <see_website@mindprod.com.invalid> - 2011-06-06 19:24 -0700
    Re: Managed-Code Bloat Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-06-07 15:44 +1200

csiph-web