incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <>
Subject Re: helper functions in reduce
Date Wed, 11 Mar 2009 00:10:06 GMT

On Mar 9, 2009, at 5:31 PM, Adam Wolff wrote:

> but it bothers me a little that those three functions are defined  
> every time
> that reduce is run.

They're not. They're defined when the source code is parsed, not when  
it's run. The only difference it makes to have them inside the reduce  
function is that they can access local variables of that function.  
There shouldn't be any difference in speed.

View raw message