Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: The Trove collection classes

The Trove collection classes TheTrove, an open source Java collection package, provides an efficient alternative to the core Java collection classes, especially for implementing collections whose keys or values are primitive types. In this installment of

Tutorial Details:

Open addressing
Trove maps are implemented using open addressing instead of chaining. Within the Java core collection classes, most maps are implemented using chaining, which works so that if more than one key maps to the same index location in the table, then that index location holds a linked list of all the elements mapping to that location. Open address maps instead assume that there is likely to be a nearby free index in the table. That way, if the ideal slot is full, the map implementation looks in the next few slots to find an open slot. This approach eliminates the need for the linked list nodes, so Trove maps tend to have a smaller memory footprint than the equivalent core collection classes. With open addressing, you need to be careful that the map is maintained at a size that allows sufficient free indexes so that performance doesn't suffer. (Trove accomplishes this feat by keeping the load factor under 0.5.) But otherwise, open addressing is equally as efficient as chaining -- and can be better in many cases


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
The Trove collection classes

View Tutorial:
The Trove collection classes

Related Tutorials:

Singletons vs. class (un)loading - JavaWorld - May 1998
Singletons vs. class (un)loading - JavaWorld - May 1998
 
Bean Markup Language, Part 1 - JavaWorld August 1999
Bean Markup Language, Part 1 - JavaWorld August 1999
 
Smart object-management saves the day - JavaWorld November 1999
Smart object-management saves the day - JavaWorld November 1999
 
Java performance programming, Part 3: Managing collections - JavaWorld February 2000
Java performance programming, Part 3: Managing collections - JavaWorld February 2000
 
Optimize a query on a Map - JavaWorld November 2000
Optimize a query on a Map - JavaWorld November 2000
 
iContract: Design by Contract in Java - JavaWorld February 2001
iContract: Design by Contract in Java - JavaWorld February 2001
 
Accelerate your RMI programming
Accelerate your RMI programming
 
Check out three collections libraries
Check out three collections libraries
 
replacing implementation inheritance by contract inheritance
replacing implementation inheritance by contract inheritance
 
Joott Quick Start Guide
Joott Quick Start Guide JooTemplates is a templating system to generate business documents, such as forms, mailings and reports. It is being developed with the following aims
 
Using Java Classes in Windows Batch Files
Using Java Classes in Windows Batch Files - a simple approach for system admin Although Java is an ideal language for implementing rich GUI applications, it is equally well-suited for the development of small console-based programs that, in turn, are p
 
Mantissa
Mantissa (Mathematical Algorithms for Numerical Tasks In Space System Applications) Overview Mantissa is a collection of various mathematical tools aimed towards for simulation. It is not a complete mathematical library like GSL, NAG or IMSL, but it con
 
Maven: Trove of Tips
Maven: Trove of Tips This article will show some of the tips and tricks I figured out with JDoppio. Hopefully, I can give you a hint how to proceed and where to get help. In the end, Maven is all about helping you, fellow developers and users, to save ti
 
The Trove collection classes
The Trove collection classes TheTrove, an open source Java collection package, provides an efficient alternative to the core Java collection classes, especially for implementing collections whose keys or values are primitive types. In this installment of
 
Garbage Collection in the Java HotSpot Virtual Machine
Garbage Collection in the Java HotSpot Virtual Machine Gain a better understanding of how garbage collection in the Java HotSpot VM works, and learn to take full advantage of it when designing, developing, and deploying your Java applications.
 
Access Windows Performance Monitor counters from Java, Part 1
Access Windows Performance Monitor counters from Java, Part 1 Use a simple Java API to gather valuable performance statistics Summary Windows NT, 2000, 2003, and XP contain a utility called the Performance Monitor that provides a rich array of perform
 
Commons Transaction
Commons Transaction aims at providing lightweight, standardized, well tested and efficient implementations of utility classes commonly used in transactional Java programming. Initially there are implementations for multi level locks,
 
Core Java Interview Questions!
Core Java Interview Questions! Core Java Interview Questions Question: What is transient variable? Answer: Transient variable can't be serialize. For example if a variable is declared as transient in a Serializable class and the class is written
 
Collection of Large Number of Java Interview Questions!
Collection of Large Number of Java Interview Questions! Collection of Large Number of Java Interview Questions The Core Java Interview Questions The Jakarta Struts Interview Questions
 
Collection of Large Number of Java Sample Programs and Tutorials
Collection of Large Number of Java Sample Programs and Tutorials Collection of Large Number of Java Sample Programs and Tutorials HelloWorld Java Program Simple Java Program for beginners that prints HelloWorld! on console.
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.