On Wednesday 30 January 2008 17:14, Robert Hailey wrote:
> 
> On Jan 30, 2008, at 6:16 AM, Matthew Toseland wrote:
> 
> > Isn't it cheaper to scan the array four times than to allocate an  
> > object in an
> > inner loop? Yes I know that allocations are cheap in modern java,  
> > but even so
> > (cache trashing for example - GC is not free)? Also iirc it was 3  
> > times (once
> > with backoff, once without, once for comparison).
> 
> 
> On Jan 30, 2008, at 6:40 AM, Matthew Toseland wrote:
> > At a closer look, I suggest you merge the two functions to avoid the
> > allocation. You don't save much complexity by having them separate.
> > Double-check the unpickedLocs logic - if we want to keep it, iirc  
> > atm we
> > don't use it.
> 
> Hmm... it looks like the unpickedLocs will get backed off locations  
> too (before backed off locations are resorted to for routing), is that  
> what you mean? Arguably this still matches the return specification  
> ("locations we could have routed to"). If we do use it, it needs to be  
> consistent anyway; if we don't, this is an implementation detail.

Yeah, include them.
> 
> Functions merged in r17413.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080130/89ab1e98/attachment.pgp>

Reply via email to