Re: JavaMemoryModel: A memory model for the masses

From: Joshua Bloch (
Date: Wed Nov 10 1999 - 13:17:11 EST


    It's kind of off-topic, but I don't think this characterization is fair:

>the next problem is that because of java's pseudo-functional approach to
>operations, combined with their use of unicode, any string-intensive (i.e.
>almost any servlet, since they usually generate tons of html) application
>going to generate massive amounts of allocation and GC. database server
>written in java is compute bound, rather than being IO bound. until it is
>efficient enough to be IO bound, java will be seriously limited on servers.

    Such servlets are, to paraphrase your previous posting, "horribly
programmed." When used properly, immutable ("Pseudo-functional") classes
like String can increase performance, rather than decrease it. You just
have to know when it's more appropriate to use a StringBuffer, or a char
array, or a byte array. Java provides several tools, and you have to choose

. This whole topic touches a raw nerve with me, because so many programmers
err on the side of excessive mutability. (Look at Date and Calendar for
extreme examples of this phenomenon.)


JavaMemoryModel mailing list -

This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:22 EDT