priority-queue icon indicating copy to clipboard operation
priority-queue copied to clipboard

Switch from IndexMap to hashbrown's RawTable

Open garro95 opened this issue 6 years ago • 2 comments

garro95 avatar Jul 27 '19 15:07 garro95

Thanks for the crate. Can you say a bit more about why you want to make this change and what might be difficult about it? If it's something a Rust newbie could do, I'm happy to look into it.

akprasad avatar Oct 28 '22 03:10 akprasad

Hi. Thank you for your interest and sorry for the late response. Said that IndexMap is a fantastic project and that it works very well, my idea is that relying on it adds an extra level of indirection and extra space usage. Since PriorityQueue has already the vector pq inside, the property of IndexMap that the indices are contiguous is something extra and maybe using a RawTable could improve performance in this sense.

Before being able to do that, it's probably necessary a refactor to improve the internal Store API so that the other modules don't access directly the underlying datastractures with assumptions that may be broken.

After that, the changes to the store structure can be applied, and I expect to have some experiments and benchmarks to do to understand if the change is really an improvement for performance or there are other changes that can bring more benefits

garro95 avatar Nov 11 '22 07:11 garro95