Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Jan Burse Newsgroups: comp.lang.java.programmer Subject: Re: Immutable Datastructures with good Sharing Date: Sun, 06 Nov 2011 16:54:21 +0100 Organization: albasani.net Lines: 48 Message-ID: <4EB6ADAD.8040001@fastmail.fm> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net gaA/zg4jNiP+gdgpsXrv3enHQwWiYSlPEeBw4+tJ32Gqifk0c2jFKsy6sIqRxe3bO9cwZeFxwNp/w0EuAUs3mg== NNTP-Posting-Date: Sun, 6 Nov 2011 15:54:21 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="bNFYnI1UUAOfW4J9QEv6xokeTG3pFM/H6bw3UBGbx1taVI24IpjrPlmLau0XNXd/iDfAStujz6BY0g4RhS/wqWzpZSrrs56biCDp4tkcF4mfj2cnWH6BYOE1XMFm2t6P"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110928 Firefox/7.0.1 SeaMonkey/2.4.1 To: Giovanni Azua In-Reply-To: Cancel-Lock: sha1:b5KaWCGSOPGlw2MkipxhRSRH3II= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9659 Giovanni Azua schrieb: > Hello, > > I haven't read/followed the whole OP Thread discussion but I thought it was > worth mentioning/recommending the Google "Guava Project": > http://code.google.com/p/guava-libraries/ > > I think they really "went to town" on that one. You have strongly typed > Immutable Collection definitions for all Java Collection types e.g. > ImmutableMap.Builder, ImmutableList.Builder. The design is awesome e.g. the > Builder pattern as prescribed in Effective Java (last edition) and the > performance gains are noticeable as well e.g. In a distributed system I have > been working on lately, switching the attribute instances of the DTO Beans > from ArrayList Java Collection to use instead the implementation from Guava > gave some noticeable 15-20% Serialization performance gain e.g. Test case > involving 1-Echo-Server and 1K-Clients. > > I really enjoy the improvement in code readability as well, it suits the > appropriate template types e.g. > > // from > List requests = new ArrayList(); > > // to > List requests = Lists.newArrayList(); > > Guava really rocks! Would this be the Java Collections design debt now > finally paid by Joshua Bloch? > > HTH, > Best regards, > Giovanni > > > Thank you very much for the hint. Just googled the google code library for "Immutable". Found another project as well: http://code.google.com/p/pcollections/ And one based on Scala: http://code.google.com/p/scala-deque/ And some not projects which do not yet show some download. Bye