On Sun, 19 Dec 2010 07:47:11 -0500
Michel Fortin <[email protected]> wrote:

> On 2010-12-19 07:33:29 -0500, spir <[email protected]> said:
> 
> >     // pointer
> >     t0 = time();
> >     foreach (n ; 0..N2) {
> >         p = (n in table);
> >         if (p) b = table[n];
> >     }
> 
> But why the double lookup? Just dereference the pointer:
> 
>       foreach (n ; 0..N2) {
>               p = (n in table);
>               if (p) b = *p;
>       }

Oops, sorry, code copy error. But this does not change the test result times 
(because nearly no key exists in the table).

denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com

Reply via email to