Tag Archives: java

Java Performance: synchronized() vs Lock

Yesterday, I noticed that one of our systems was using a Lock where a plain old synchronized() block would suffice, and I thought to myself, does this matter? Since the Lock was already fulfilling the same role, the only real question was performance. My gut told me that there should be a performance difference between [...]

Posted in java | Also tagged | 7 Comments

Reading files quickly in Java

I came across a really interesting, well-done blog post today about the quickest way to do high-performance file IO in Java. It does a really good job of breaking down the alternatives of how to get bytes into memory, covering both traditional and NIO options in a good amount of detail. It’s a must-read for [...]

Posted in Miscellaneous | Also tagged , | Leave a comment

Avoiding Java varargs snafus

Since Java 1.5, Java has allowed you to take advantage of “varargs“, a usability feature that many other languages support. It lets you write really clean code and support some pretty cool use cases. However, there is at least one possible pitfall of using varargs. Consider the method below: public boolean filter() { (do some [...]

Posted in Miscellaneous | Tagged | 1 Comment
  • Rapleaf Is Hiring!

    We are looking for engineers who want to solve challenging problems.

    We have great people, do great work, and have great perks.

    Know someone who might be interested? Refer a friend and get $5,000 for successful hires.

    See our current openings at
    www.rapleaf.com/careers