-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The current version of happly is quite slow for large files compared to an home-brewed solution I cooked up. The profiler suggest that the problem is allocating many small vectors in list properties. On the Lucy model from the Stanford repo, happly takes about 16 seconds of which 7 are just vector allocs. My home-brewed solution takes half that time.
I propose the following changes:
- change the storage of list props from
vector<vector<T>> datato three vectors for start, count and datastd::vector<size_t> start; std::vector<uint8_t> count; vector<T> data;, where data has the concatenated list of elements, start has the starting index for each list and count contains the lists sizes - in a backward compatible manner, add
getListProperty(vector<array<T, N>>& data, vector<uint8_t>& count)to read the data in preallocated lists; maintain previous versions for backward compatibility
If this sounds good, I may even take a crack at it, but only if this feels right.
loryruta
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request