Re: primitive arrays vs Collections (performance wise)

2011-01-06 Thread Thomas Broyer
Modulo ClassCastException and the like (e.g. instanceof checks), Java arrays are compiles straight into JavaScript arrays; while collections have an emulated "wrapper" class around a JavaScript array. However, due to how the compiler inlines methods, most accesses to a collection's item (i.e. by

primitive arrays vs Collections (performance wise)

2011-01-06 Thread Rafael
Hello there! I've meaning to ask you the question implied in the subject of this post. Is there an advantage in favoring Arrays over Collections when working with code that will end up in the client (translated to HTML and JavaScript that is)? My gut tells me that i should stick to arrays in orde