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: Bulk Array Element Allocation, is it faster? Date: Sun, 25 Sep 2011 20:21:22 +0200 Organization: albasani.net Lines: 18 Message-ID: References: <9e8fplF19bU1@mid.individual.net> <9e8kdhF6lmU1@mid.individual.net> <13107318.1206.1316973732647.JavaMail.geo-discussion-forums@prfp37> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net JRdZjj3vhuYFq72/G1Q2yyji7wETSyGKHB1kdh1FUHt0kOsM9INY9ZCgtY6eSRTm3ir6uM1S19GBjHO7eP+NgA== NNTP-Posting-Date: Sun, 25 Sep 2011 18:21:23 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="MGOP2ATG0fN49et6IVjyXeNMjxQZiP5m3GCDDSB6nDvE0gp+StJrIN2/9XbZotkECbL+QY0TeXo8DuqJdVHUrWhrvPgQp2lZ0ljjkDvMzdyYby7ik7c78UmACLKKZqJq"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20110902 Firefox/6.0.2 SeaMonkey/2.3.3 In-Reply-To: Cancel-Lock: sha1:RMdl1sjSH13cueHOKqlJ5e60i3E= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8303 Jan Burse schrieb: > Lew schrieb: >> This is equally true of primitive arrays. Why do you claim otherwise? > > No, I don't claim otherwise. new int[] and new double[] > would also need treatment when the values 0 and 0.0 > are not appropriate. > > But you never run into a null-pointer exception with > primitive arrays, so they are a little bit more ready > made than non-primitive arrays. > > Bye Just compare with C array allocation of a bunch of fixed size records. In C you get the records. In Java you only get the array but no records in it.