Saturday 2 June 2012

Data Structures with Java

Data Structures with Java

Today, I tried exploring the world of data structures using Java; it's time complexity, JVM's behavior when it comes to core dumps (as against c++). I found a very interesting part. I found that though there is no complexity of use of pointers in Java, it is very advantageous to use pointers while implementing non-linear data structures like Trees and Graphs. 

So, here's the question - How do I use simple, powerful language like Java but yet get the advantages of C++'s time optimization capabilities? One approach towards this is to use the Java's Native API. Though this still has overheads of two stack calls (One to load the library and the other to call the native function), I feel this approach is far better than actually implementing the data structure algorithm in Java.

No comments:

Post a Comment

Do you like our Content?