Current implementation heavily uses reflection and is used on a hot path in many places in neofs-node:
- Shard sorting
- Calculating container nodes for a placement policy.
It makes sense to optimize for common use-cases:
- Uniform sorting.
- Think about reusing memory and designing an appropriate API.
- Use
sync.Pool and see if it helps.
May be we could use generics here, but the task is not about this.
Current implementation heavily uses reflection and is used on a hot path in many places in neofs-node:
It makes sense to optimize for common use-cases:
sync.Pooland see if it helps.May be we could use generics here, but the task is not about this.