Posts Tagged: gc

java code

Java Dependency Injection and a Useless Annotation

Posted by & filed under , .

I’ve stepped into the Guice territory rather recently — coming from the Spring framework side of things — and I guess I had so far a similar love/hate experience as with Spring. I rely mostly on the javax.annotation standards anyway so to a certain degree whether it’s Spring or Guice I guess doesn’t make that much […]

Convenience Factory Methods for Collections in Java 9

Posted by & filed under , .

Looking the other day through the JDK Enhancements Proposals (aka “JEP“) I came across JEP-269: “Convenience Factory Methods for Collections”. Oh hello, where have you been all these previous JDK releases? 🙂 It seems finally the Java world has woken up to what other JVM languages (and not only!) have been offering for a while: […]

Perf4J and Object Creation/Destroy

Posted by & filed under , , , .

If at any point in your coding life you had to measure some component performance, chances are that you came across Perf4J at some point. To quote from their own website: Perf4J is to System.currentTimeMillis() as log4j is to System.out.println() There are of course other ways to measure timings of components execution, however, I found […]

StringBuilder — Memory Consumption

Posted by & filed under , .

You have seen probably my initial post about creating StringBuilder’s in Java — and the continuation of it which looked at timings involved. As I promised, I have finally had some time to look at the memory consumption involved in using the 2 ways of creating a StringBuilder in Java. I have used a code […]

Creating StringBuilder in Java

Posted by & filed under , , .

I wrote in my previous post about StringBuilder’s in Java, and I felt I should provide some measurements around the whole discussion. So I put together some quick and dirty code which is good enough for a comparison of the 2 ways of creating a StringBuilder — bear in mind I said “comparison”, as such […]

About Data Comparison in Java

Posted by & filed under , , .

If you have been involved in some coding (Java or otherwise) more than likely at some point you had to deal with the situation where you have to compare some data — for the purpose of sorting items in a list, of validating input, or many of the many other situations that require it. And […]