You can have a very time efficient set implementation with two uninitialized arrays. It's not space efficient though.