Efficient vector spaces with arbitrary bases