> > Does this make sense?
> 
> Yes.  I thought that a vec<int> for the count would be better
> but then I realized you use the hash-map as presence indicator on the queue
> as well, so we wouldn't save the vec<int> clearing.

Yep, I think we want to optimize for case wehre almost nothing needs
updating.  (Though it is not very important overall.)
I will add the micro-optimization recomputing counts in the original
loop. It is easy and will likely avoid hash map from being populated at
all.  Also will improve comments on infinite loops.

Thanks,
Honza
> 
> Richard.
> 
> > Honza

Reply via email to