Full Idea
When we see anything to be in any place in any instant of time, we are sure that it is that very thing and not another, ..and in this consists identity, when the ideas it is attributed to vary not at all.
Gist of Idea
Viewing an object at an instant, we perceive identity when we see it must be that thing and not another
Source
John Locke (Essay Conc Human Understanding (2nd Ed) [1694], 2.27.01)
Book Reference
Locke,John: 'Essay Concerning Human Understanding', ed/tr. Nidditch,P.H. [OUP 1979], p.328
A Reaction
It seems to me that Locke starts by getting it right, that we instantly perceive identities, but then confuses it with some intellectual process of comparison, and ends up thinking that idea of things is identity of ideas, which it isn't.