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 13:14:48 +0200 Organization: albasani.net Lines: 34 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 4fKgXMR+BvzMJXvvIJsEfz+/DrCvgnsZMr8LHfMLEMAU+f2/OTEcATYCTPz+VFBoCkXS7jXP3iSHEP+Y78tQ2uOC/KlE8x6H5/hLe8C1O1271miJfNegmZHuv+78qY7Q NNTP-Posting-Date: Sat, 12 May 2012 11:14:49 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="y+YcKXIeuhoG14an82oYEt1FEkTFNpl1u+vaMSS4YaXK8FHeVRoVgXXNwFuIwKhXLUNI7sT/f6R3A9vAaj46lTdqgocxJqGuFnxrLxXk5UuL0i2/q/c7vcBb7d/UzNR3"; 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:6eL+HMHguB/0OHjVD9MkiABA8WI= Xref: csiph.com comp.lang.java.programmer:14486 David Lamb schrieb: > > Many moons ago I was peripherally involved in a project that was > producing highly optimizing compilers for conventional programming > languages. I seem to recall some discussion of being able to eliminate > some heap allocations via dependency analysis, where one could sometimes > detect that the heap object lifetime didn't extend beyond the invocation > of the procedure that allocated it. Is this not possible with Java/JIT? Yes some JITs can do the required escape analysis to some extent. But when talking about JITs there is always a weak JIT and a strong JIT, since there are different providers on the market. For example I am developing the same code base for later use in both Swing and Android. And the Dalvik JIT for Android is lacking a little bit behind, you can even read recommendations to not use setters/getters (sic!) if possible in code written for Dalvik. So I am helping the JIT and I am helping the application. The code fragment under discussion is heavily used internally to the API, since the indexing is dynamic. It is still possible for the dynamic multi-indexing API, the package which has 9 classes, to provide a proper Iterator interface to the outside, and use this by the application. But if you know that youre deployment range will be only top-notch JITs you might go into the pain of adding additional class to the package for the iterator implementations. This would blow up the packgage to 11 classes, counting the .class files. Bye