Path: csiph.com!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Jan Burse Newsgroups: comp.lang.java.programmer Subject: Re: Good Fowler article on ORM Date: Sat, 12 May 2012 12:01:03 +0200 Organization: albasani.net Lines: 45 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net RKgOjqbzrG5qjIo54N3MRT/zJOGO7iPWT71AP8dBBEgtlH61Aizw2VRjJ4XUuz+vuPYQoLFvD5uvoNVhPtODQxiBpPsxHzHLi+z/JPmI9P0Oge7IF+wcOOgURAlmynEq NNTP-Posting-Date: Sat, 12 May 2012 10:01:04 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="iXZyIdyP10dESXKGaMkuqJA/yL/dCWCSMLZvLRfRJVF7nzBFAr55V7X9QeSZrDO//Z7Ordl9T4N8uJsQKUFjCjuURL7e/BQSA5XWL915BIjQrKgn3/GJsduUYPfKVyUl"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:12.0) Gecko/20120429 Firefox/12.0 SeaMonkey/2.9.1 In-Reply-To: Cancel-Lock: sha1:qc0JDLezeC+wir51TNpCj/w9KYc= Xref: csiph.com comp.lang.java.programmer:14484 David Lamb schrieb: > On 11/05/2012 4:06 AM, Jan Burse wrote: >> I also went for a custom implementation of some of >> the Collection classes, to have the algorithms not >> use iterators, but inline loops for speed. Isn't >> possible with the existing classes since one cannot >> access the fields. > > Isn't that the sort of optimization a JIT compiler > is supposed to be able to do? This would be a very very good JIT compiler. Since the issues is not simply inlining setters/getters. The issue is that there are at first hand no setter/getters. For example the table field of a HashMap is private. And then an iterator implies creating a new stateful object. Take for example the following trivial iteration without an iterator over a HashMap: for (int i = 0; i