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: Thu, 11 Aug 2011 02:01:20 +0200 Organization: albasani.net Lines: 23 Message-ID: References: <1eadnROad6gX8NzTnZ2dnUVZ_tydnZ2d@earthlink.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net wKErSFzfVa9w4T900bRUqLwlZWDeen7q4eYCwKnBiLBXBMm9TFb77MZaiGiMDeXX9gYqLg+Lbx3lwoP4rcyQI0uDughB9WJJ/948JGzaMsIroqYn1JtpkhxpeL7d/xPR NNTP-Posting-Date: Thu, 11 Aug 2011 00:01:23 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="hgXX0ko4p5NNyWwnisQyErhlIdhumbgMSs8EAHgZaLKhtY3pBkgy809Vl+GXkYo/WrhWR6J74kW5isrDet2FFc7ysHvvIpHMGiyKKO0GMrlukMmEYYE65hFE9Ve6/+Ac"; 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:CoM8eGYLvr/yNm3217kSDyKneg8= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7001 Patricia Shanahan schrieb: > On 8/9/2011 3:36 PM, Jan Burse wrote: > ... >> This is not efficient. You don't get it what the >> problem is. I really really need a highly efficient >> setSize() specialized, otherwise my stuff will not work. > ... > > How about supplying some numbers, such as the proportion of nulls and > the frequency distribution of adding various sizes of null blocks > relative to other activity. Without numbers, it is rarely possible to > get a performance issue. > > Maybe even a benchmark showing typical activity for one of your > sparse-ish arrays? > > Patricia You can assume the constraint that the element access should stay at O(1). This narrows down the possible data structures a little bit. Bye