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: setSize ArrayList, when will it come? Date: Wed, 10 Aug 2011 20:37:54 +0200 Organization: albasani.net Lines: 39 Message-ID: References: <9aetckFmvmU1@mid.individual.net> <9aftbqFa9kU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net 1/8zX6zkVr7wk1nSrVQhZlfUv9u/nd5c2OxHqcd4xMy/aeV/f/p0wqgNXLZ2QzyUEi64KEnUFpZOjNrGJZb7GA0OIP1AXQ1vnN/ObT+cWOupfqAeY1Ap02W08RCftRN2 NNTP-Posting-Date: Wed, 10 Aug 2011 18:37:58 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="tKw6NeGVKEltJDSj3eouOrcuUJkjXHHleml+cmx55CAFRQEPrC6O5Gebvaijhs3TxtDIdmYtEXDr3zFl1Yo4f03fV4IBMEG6wpzpioiTs8FcrrCyJopMzIDWVlyvq2cg"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110706 Firefox/5.0 SeaMonkey/2.2 In-Reply-To: Cancel-Lock: sha1:UMbbju3QPulCc5urtpLRX7n9YHE= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6986 Jan Burse schrieb: > I guess Larry will give me some money, when he sees that > with the new setSize() his servers will be more green. There > should be a market for energy efficiency nowadays. Look see: Migrating from Vector to ArrayList is all about energy saving. ArrayList does not use synchronized, therefore it does use less CPU. But in my case the migration is not perfect, since setSize() is missing. Migrating Hashtable to HashMap didn't cause me any pain so far. I saw the following speed-up and thus energy saveing in some sense: 32-bit JDK Synchronized: 12'898 ms (*) 32-bit JDK Un-Schronized: 12'438 ms 64-bit JDK Synchronized: 7'769 ms 64-bit JDK Un-Synchronized: 7'308 ms Now I am in the progress of migrating the Vectors to ArrayList. But because ArrayList is mindlessly lacking setSize() I am stuck. The bug report shows that I am not the only one who has experienced this problem so far. Oracle is probably less pronounced in being green compared to IBM. IBM does it under the cover of its smarter planet initiative. http://www.eweek.com/c/a/IT-Infrastructure/5-Steps-to-Green-IT/ For oracle I found also something: http://www.oracle.com/us/products/applications/green/061929.html Best Regards (*) http://www.facebook.com/photo.php?fbid=177557452312810