[jboss-dev-forums] [Design of POJO Server] - Re: Metamodel and collections

adrian@jboss.org do-not-reply at jboss.com
Thu Nov 15 05:55:57 EST 2007


"wolfc" wrote : 
  | Code with an explicit check on null is twice as fast. So I would save 1ms for every ~100000 calls. :-)
  | 

More importantly referencing an empty collection uses more memory and slows down
garbage collection.

If only the new for() loop checked for null and didn't iterate instead of throwing an NPE. ;-)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104931#4104931

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104931



More information about the jboss-dev-forums mailing list