Avoid synchronization where possible.
ArrayList is faster than Vector
Only List and Map have efficient thread-safe implementations: the Vector and Hashtable classes respectively.
Synchronized methods are slower than the identical non-synchronized one.
Consider using non-synchronized classes and synchronized-wrappers.
FastVector is faster than Vector by making the elementData field public, thus avoiding (synchronized) calls to elementAt().
Use threads. Prioritize threads. Use notify [...]
Filed under: Performance | Leave a Comment »