News for hackers. Stuff that matters.
Re:On Android, Garbage Collection Can Kill You by soc88 on Monday June 25, 2012 @11:49AM (#4157042)
> Functional programming style tends to generate lots and lots of objects which die very young.

Well, there is a lot of Scala code out there doing exactly that.

HotSpot has no problems with short-lived objects in pretty much all its garbage collectors while Dalvik's GC is just a lot less sophisticated and mature.

So I mainly agree with you, but the proposition of

      Language allows producing lots of short-lived objects
    + Dalvik sucks
      ------------
      Programs in that language have to be slow
doesn't hold in my opinion, as seen in the differences between Scala and Clojure.
Re:On Android, Garbage Collection Can Kill You by loup-vaillant on Monday June 25, 2012 @01:53PM (#4157656)
> Well, there is a lot of Scala code out there doing exactly that.

I talked about specific examples that I don't even know of. I don't know Scala enough to know whether non-destructive updates are the default. Are they? What about the core libraries?

I agree your proposition in fixed width font does not hold. I was merely asserting this one:

    Program P produces lots of short-lived objects
  + Dalvik sucks (or is tuned for long lived-objects)
    -------------------------------------------------
    Program P have to be slow
Re:On Android, Garbage Collection Can Kill You by lucian1900 on Monday June 25, 2012 @01:44PM (#4157613)
Clojure still generates a lot more garbage, especially during bootstrap. This can be seen easily with VisualVM on the desktop, comparing hello world in the two languages.