Archives for December 2011

Print assembly for Java

The modern openjdk’s JVM is able to print assembly for generated machine code – see Oracle’s blog post. To start working with this option you need hsdis plugin, available here. Then put the downloaded library to the location your OS aware of. E.g. if you’re using linux all you need is to update LD_LIBRARY_PATH: export [...]

Tuning Intellij Idea

First of all consider changing idea.vmoptions. idea.vmoptions is a text file with a list of JVM settings, it’s usually found in the bin folder in the Idea installation folder. This file can be open in any text editor. The following settings increase performance drastically on Sun JVM 1.6: -server -Xms128m -Xmx512m -XX:MaxPermSize=250m -XX:ReservedCodeCacheSize=64m -XX:+UseConcMarkSweepGC -XX:+AggressiveOpts [...]

instanceof vs Visitor

I always was curious on how effective is visitor pattern vs instanceof when it comes to detect whether the given base implements certain interface or not. I had 7 interface classes and visitor for all of these, and 7 concrete implementations, then I tested instanceof and visitor pattern on a large collection of randomly picked [...]