Amir Langer
A few months ago, my colleague Mike Barker tackled a word split algorithm (see here) and proved that taking the parallel approach may not always be right. In some case, a simple 20 lines single threaded “naive” solution can out-perform your hard thought complex multi-threaded monster. Still - the problem is intrigued me because on the face of it - This is an ideal problem for a parallel algorithm. It is a classic “Data parallelism” problem borrowed from Guy Steele’s examples of
2011-11-12
3 min read
Yesterday I bumped up the version of Freud from 0.9 to 1.0. Apart from finally getting round to write some wiki entries on how to start using Freud, the main addition is the support for analysis of Java class files. Freud can now iterate over class files and parse them into a ClassFile object. This allows assertions to inspect the constant pool, the fields and methods inside the class. Inside every method, we can now look into the JVM instruction set, the local variables etc.
2011-08-15
2 min read
In an earlier blog I was trying to describe my take on some of the key ideas behind the disruptor pattern. In this one I’ll focus on a tiny detail. One of many scattered around the disruptor code base, as an example of the low level you get to when writing low latency code. and here it is - To calculate the index in the ring buffer backing array (an int obviously) from the sequence (a long), the ring buffer performs a mod operation using the bitwise AND operator (and making sure the size ie.
2011-07-12
3 min read
The Disruptor pattern was developed at LMAX to solve the problem of exchanging information between different processing stages, and do it much faster than traditional approaches. Knowing that “there is no such thing as a free lunch”, most of the questions we get try to focus on the how and where is the trade off? In the next few blogs I’d like to give my take on it and where I think the “magic” is.
2011-07-07
2 min read
Finally got annoyed enough to try and track down why this feature stopped working in IDEA10… Its there - its just disabled by default. In Settings -> Intentions-> Declaration - > Create Field for Parameter … set to enabled. It is still limited to just one parameter at a time, but better than nothing.
2011-06-19
1 min read
Why static analysis? Because compilers are not enough. - Many times we want to test contracts and conventions in the code which compilers cannot test and on a large scale project - manual review is impossible (and like javadoc does not stand the test of time and maintenance). What do we mean by contracts and conventions? Well - Really we’re talking about anything we want to enforce in the code and is not enforced by the compiler.
2011-04-26
3 min read