If you are using OSX and you need to upgrade Subversion (SVN) to 1.5.5 (or higher) you have probably gone to the subversion website and found out that you need fink or macports or some such. Since I more of the point and click type when it comes to my OS, I prefer installers, so here is the place to get one:
http://www.open.collab.net/downloads/apple/index.html
It is as easy as: download => install => use => done
Aaron Zeckoski is a technology leader recognized for his expertise in educational technologies and learning systems. He has been an open source architect working on learning systems projects like Sakai. This is a technical blog about software engineering, servant leadership, and whatever else.
Wednesday, January 28, 2009
Tuesday, January 06, 2009
Java Collection Performance
This is just a helpful reference when trying to decide which collections to use in Java. I use this for my personal reference but it may help others as well. The links go to the Sun Javadocs. The collections of each type are ordered based on performance (i.e. the highest performance (highest speed) ones are listed first and will be the fastest for most operations)
List - this is an ordered list of objects, insertion order is maintained and retrieval order is in the list order but items can also be random accessed, duplicate items are allowed, generally allow storage of null values (the ones below do), generally fast to iterate and find items by position but slow to do lookups
List - this is an ordered list of objects, insertion order is maintained and retrieval order is in the list order but items can also be random accessed, duplicate items are allowed, generally allow storage of null values (the ones below do), generally fast to iterate and find items by position but slow to do lookups
- ArrayList - Unsychronized, nulls allowed (fastest)
- Vector - Synchronized, only slightly slower in tests of sizes under 100000
- Stack - Synchronized, same speed as Vector, LIFO queue
- LinkedList - Unsynchronized, allows two way iteration and modification of items (like a stack or queue)
- CopyOnWriteArrayList - Synchronized, significantly slower in tests of large numbers of items or average list changes, only slightly slower when used with very small numbers (<100)>
- HashSet - Unsychronized (fastest), slower than HashMap which it is built on, allows nulls
- LinkedHashSet - Unsychronized, ordered by insertion, allows nulls
- TreeSet - Unsychronized, ordered by the natural ordering of the items or a comparator provided at construction, allows nulls but there are issues with removing them
- CopyOnWriteArraySet - Synchronized, significantly slower in tests of large numbers of items or average set changes, only slightly slower when used with very small numbers (<100)>
- IdentityHashMap - Unsychronized (fastest), uses reference equality (==) instead of object equality (equals) to compare keys, actually violates the Map interface guarantee, all iterators are unordered, allows null keys and values
- HashMap - Unsychronized, this is the fastest general purpose map, all iterators are unordered, allows null keys and values
- ConcurrentHashMap - Synchronized, all iterators are unordered, does not allow null keys or values
- Hashtable - Synchronized, all iterators are unordered, does not allow null keys or values
- LinkedHashMap - Unsychronized, all iterators are ordered based on insertion order of the original key (does not change if a key is reinserted), allows null values but null keys are not allowed
- TreeMap - Unsychronized, iterators are ordered by the natural or comparator ordering of the keys, allows null keys and values but the comparator needs to understand them
Subscribe to:
Posts (Atom)