performance optimization for nabo NNS