Changes for performance

* changed to use native methods if available
* Changed to not use reduce in set operations