Archive for February, 2008

How to split a file, process the pieces in multiple threads and combine results using a shell script

Tags: , , , , , ,

Say you are in a situation where you have a file with a huge number of records to be processed and the processing of one record does not need data from the processing of previous records (ie. a perfectly paralellizable situation), what can you do to speed up things? Well, here’s what I did when [...]

Continue reading » 4 Comments

Java Synchronization Benchmark

Tags: , , , , , , , , ,

Here is a very simple and straightforward benchmark to demonstrate how synchronization in Java can affect speed of execution to different extents in Java 1.4 and Java 6. In the attached image (click above for full size), you can see that for Java 1.4 the synchronized method needs over 700% more time to do its [...]

Continue reading » 7 Comments