Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 10 Aug 2011 20:42:46 -0500 Date: Wed, 10 Aug 2011 18:42:44 -0700 From: Patricia Shanahan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: setSize ArrayList, when will it come? References: <1eadnROad6gX8NzTnZ2dnUVZ_tydnZ2d@earthlink.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Lines: 26 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 70.230.203.65 X-Trace: sv3-H4XqgZguXziNJFtEI97+ab6XdqmrJSno4quJXaTlo9GYO1UaOVt6iO3r0uzbC8iEf51Bc3yKWuioEvD!8YEy/O9cXYQKf0a93cRykofqSWxRbN++o2DC9Vhadx8efF0LLueSdgdmtVNdCK4NB7eOCd9lXEmv!Ujcn2yk49RmOmaoiW1sohDHGy3XJ/s5p/g9UBbIAAHeymQ== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2329 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7005 On 8/10/2011 5:01 PM, Jan Burse wrote: > 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. Does that include accesses that require a size increase? Patricia