Re: JavaMemoryModel: A memory model for the masses

From: Joshua Bloch (jbloch@eng.sun.com)
Date: Wed Nov 10 1999 - 13:17:11 EST


David,

    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
string
>operations, combined with their use of unicode, any string-intensive (i.e.
any
>almost any servlet, since they usually generate tons of html) application
is
>going to generate massive amounts of allocation and GC. database server
code
>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
judiciously.

. 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.)

                    Josh

-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



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