sfu-dis / pibench

Benchmarking framework for index structures on persistent memory
MIT License
87 stars 20 forks source link

Use vector.reserve() instead of resize() #35

Closed dpsi closed 3 years ago

dpsi commented 3 years ago

Based on the comments it seems like the intention was to call reserve(). While resize to 0 does not decrease capacity() (and therefore no memory is de-allocated), the constructor and destructor for each element is still called. Since the struct also contains a vector the overhead of constructing and destructing is compounded.

dpsi commented 3 years ago

After looking at the commit history, it seems like the comment is very poorly phrased. It would be more clear if the comment stated something along the lines of "force a page fault now to avoid it during runtime"