Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

uniqueItems validator #16

Open
seagreen opened this issue Mar 31, 2014 · 4 comments
Open

uniqueItems validator #16

seagreen opened this issue Mar 31, 2014 · 4 comments

Comments

@seagreen
Copy link
Contributor

(spec for uniqueItems validator)

It's incredibly slow the way it's currently written. Got any hints on how to check an []interface{} for uniqueness of elements?

@titanous
Copy link
Member

Hmm, are we just comparing simple objects like strings and numbers, or objects too?

@seagreen
Copy link
Contributor Author

@titanous
Copy link
Member

That's basically impossible to do in a performant way. Leave it for now. If it becomes an issue in the future we'll have to implement our own hash algorithm that can hash any object (ugh).

@seagreen
Copy link
Contributor Author

seagreen commented Apr 7, 2014

Link to the abandoned branch for posterity.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants