Tuesday, October 22, 2013

... Java so fast it blows women's cloths off!

The question I am trying to answer is what does it take to get Java to perform so fast it blows women's cloths off. The goal is not to understand what is fast - but simply to look at techniques which are faster than anything else available.

1. Never use java.util (collections). They generate tremendous amount of garbage and are slow.
2. Avoid garbage collection
 3. Reuse strings.
3. Async Logging - i.e. don't spend all your time writing logs
4. Don't use the Heap - i.e. No heap = no GC.
5.  Know what the heck your system is doing. Maybe it's the machine and not your crappy-code?
6. Use a ring instead of a queue / thread message passing
7. Maybe the problem isn't with your code at all - but with the watch you use?
8. Keep your methods short and sweet - helps with hotspot
9. Try some exotic features
 10. CAS / optimistic locking / lock free

DemiGods in this space - 










No comments: