Ashish Saharia's Virtual Realm


Miscellaneous

[Anything can be put under 'Miscellaneous'.]


RapidQueue.java - A hand-crafted class that offers speeds comparable to HashMaps, with the convenience of a List.

RapidQueue Feature Comparison

   RapidQueueArrayListVectorLinkedListConcurrentLinkedQueueLinkedHashSet
Can Be Used As A Queue YesYesYesYesYesYes
Position-Based Element Access YesYesYesNoNoNo
Indexed Values For Faster Searches YesNoNoNoNoYes
Duplicates Allowed YesYesYesYesYesNo
Implements The Queue Interface YesNoNoYesYesNo
Implements The List Interface YesYesYesYesYesNo


RapidQueue Performance Comparison (Approximate)

Hardware - AMD64 X2 5600+ Dual Core Processor | 2 GB RAM

Software - Windows XP Professional SP2+ | JDK v1.6.0_06

   RapidQueueArrayListVectorLinkedListConcurrentLinkedQueueLinkedHashSet
25000 Iterations
Add Time (Sec.)00.053600.003300.001700.003400.002800.0129
Contains Time (Sec.)00.005808.437708.365710.845209.248000.0028
Remove Time (Sec.)00.005600.271000.269800.000607.686400.0045