News for hackers. Stuff that matters.
Re:Google Closure: How not to write Javascript by latortuga on Thursday November 12, 2009 @10:38AM (#937909)
I've done a lot of testing on creating strings by concatenation and it turns out that + is actually one of the slowest. It's much faster, for example, to create an array and then join it with "". Maybe try that in your test and see how it compares.

Example:

  x = []
  x.push("latortuga")
  x.push(" is so right")
  str = x.join("")
Re:Google Closure: How not to write Javascript by paulsmith on Thursday November 12, 2009 @11:01AM (#937973)
That's a different issue than the what the OP was writing about, which is getting a string representation of an object, in this case, a function.
Re:Google Closure: How not to write Javascript by apgwoz on Thursday November 12, 2009 @10:46AM (#937927)
This used to be true in Python as well, but I'm not sure if it still holds for recent versions.