Michael Geary wrote:

> I just tested it, and interestingly enough, that version takes about twice
> as long as the current PolyGonzo code.

Glad to know.  I have committed the same sin many times.

> > Is your own "round" function (interpreted) more efficient
> > than the built-in "Math.round" function (compiled) ?
>
> It *is* the native Math.round function, just a local reference to it.
>
> In theory, this should speed things up by avoiding some name lookups. But I
> just tried a quick test and didn't notice any measurable difference in IE or
> Firefox.

If you are really bored, you might try the following:

    ~~ (whatever * 10 + 5)

"~~" performs integer truncation without a function call.

> There's no function being redefined here. Is that the potential conflict you
> were asking about - the fact that both PG and Google do something similar?
> That's no problem at all. Each anonymous function is independent of any
> others.

Google's "main.js" defines the "()" function in the global name
space.  Google's modular js files define different cryptic names in
the global name space.  I thought I might be playing with fire.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to