netmap: Provide placement methods returning indices instead of copied node descriptors #541
Labels
enhancement
Improving existing functionality
I3
Minimal impact
performance
More of something per second
S3
Minimally significant
U3
Regular
Is your feature request related to a problem? Please describe.
network map is an array of storage nodes' descriptors of type https://pkg.go.dev/github.com/nspcc-dev/[email protected]/netmap#NodeInfo, and
return
[][]NodeInfo
. This is pretty big overhead since all resulting 2d array's items are copied elements from the input array. Moreover, the elements may repeat (afaik)Describe the solution you'd like
provide methods returning
[][]int
- indices from the inital arrayDescribe alternatives you've considered
provide iterators, but it's better to start with indices cuz they are simpler imo
Additional context
The text was updated successfully, but these errors were encountered: