Performance increase matching existing records (rev. 23)

Signed-off-by: nixnodes <code@eth.si>