BlueBrain / libsonata

A python and C++ interface to the SONATA format
https://libsonata.readthedocs.io/en/stable/
GNU Lesser General Public License v3.0
11 stars 12 forks source link

Use `RawIndex = std::vector<std::array<.., 2>>`. #294

Closed 1uc closed 11 months ago

1uc commented 11 months ago

The memory layout of an std::vector<std::array<...>> is better than std::vector<std::vector<...>>. This allows HighFive to avoid numerous allocations and copies. Additionally, I feel it's simpler because it avoid the ambiguity of rows of differing length, when in fact the RawIndex seems to be a vector of ranges.

mgeplf commented 11 months ago

very nice, thanks