On 11/13/12 11:33 AM, Marvin Humphrey wrote:


I would oppose a seek() which runs implicit searches behind the scenes because
it would surprise users with a hidden performance cost.


I was imagining that $hits->seek() would just adjust the iterator pointer, like a shortcut for this pseudo-code:

 sub seek {
     my ($hits, $new_pos) = @_;
     # some error check here to verify $new_pos
     # isn't beyond the offset+num_wanted
     while ($hits->current_pos < $new_pos) {
         $hits->next or last;
     }
 }


--
Peter Karman  .  http://peknet.com/  .  [email protected]

Reply via email to