Tuesday, September 21, 2010

Re: [] or ArrayList

On Sep 21, 1:08 pm, Stefan Bachert <stefanbach...@yahoo.de> wrote:
> Hi,
>
> What are the pros and cons for arrays using either
>
> a) []
> b) ArrayList
>
> in GWT, especially in RPC?

Arrays are (almost?) directly mapped to JavaScript arrays in "prod
mode", while ArrayList wraps a JavaScript array, so arrays are a bit
lighter and faster (ArrayList methods are almost all inlined, but you
still have to pay for the creation of the wrapper, and of the Iterator
instances!)
I suspect this is negligible though, and you should really choose
depending on your needs, as those are different APIs for different
purposes.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment