[aura-dev] Re: "map/reduce" speed
- From: Jeffrey Alexander <jeff.alexander@sun.com>
- To: dev@aura.kenai.com
- Subject: [aura-dev] Re: "map/reduce" speed
- Date: Mon, 22 Jun 2009 17:14:56 -0400
On Mon, 2009-06-22 at 16:58 -0400, François Maillet wrote:
> It's weird because the original version worked on my system.
>
> But by casting to int in the process method, you can optimizing it
> further by changing the collect function to this :
>
> def collect(results):
> return sum(results.toArray())
Done. The result is pretty much the same. It does seem like this runs
faster than the JavaScript version, although this is just based on
running several times and seeing the numbers. The Python seems to take
about 110ms whereas the JavaScript takes about 120ms. Since this all
involves compiling code down to the JVM, I'd guess that the 10ms may be
lost in invoking the compiler.
> Might help for the benchmark.
That change didn't make a difference. It almost certainly ends up as
the same bytecodes.
Jeff
| Jeffrey Alexander | 06/22/2009 | |
| Paul Lamere | 06/22/2009 | |
| Stephen Green | 06/22/2009 | |
| Jeffrey Alexander | 06/22/2009 | |
| Jeffrey Alexander | 06/22/2009 | |
| Paul Lamere | 06/22/2009 | |
| François Maillet | 06/22/2009 | |
| Jeffrey Alexander | 06/22/2009 | |
| François Maillet | 06/22/2009 | |
|
[aura-dev] Re: "map/reduce" speed |
Jeffrey Alexander | 06/22/2009 |





