Greatly increase speed of diffing keys
Greatly increase speed of diffing keys

Summary:
diffInternal is sorting deps using a quadratic algorithm. That's really,
really unnecessarily slow.

Change it to use a linear algorithm by computing (and maintaining) a
mapping of name->index.

Test Plan: CI, manually test against real data

Reviewed By: ttsugriy

fbshipit-source-id: 8d044b4

shs96c/buck,rmaz/buck,shs96c/buck,nguyentruongtho/buck,shybovycha/buck,shybovycha/buck,JoelMarcey/buck,rmaz/buck,ilya-klyuchnikov/buck,ilya-klyuchnikov/buck,ilya-klyuchnikov/buck,brettwooldridge/buck,Addepar/buck,kageiit/buck,shs96c/buck,brettwooldridge/buck,romanoid/buck,romanoid/buck,facebook/buck,JoelMarcey/buck,SeleniumHQ/buck,ilya-klyuchnikov/buck,romanoid/buck,shs96c/buck,kageiit/buck,LegNeato/buck,ilya-klyuchnikov/buck,clonetwin26/buck,ilya-klyuchnikov/buck,romanoid/buck,kageiit/buck,JoelMarcey/buck,romanoid/buck,SeleniumHQ/buck,zpao/buck,SeleniumHQ/buck,zpao/buck,ilya-klyuchnikov/buck,Addepar/buck,SeleniumHQ/buck,LegNeato/buck,brettwooldridge/buck,rmaz/buck,rmaz/buck,SeleniumHQ/buck,romanoid/buck,JoelMarcey/buck,clonetwin26/buck,shs96c/buck,Addepar/buck,Addepar/buck,JoelMarcey/buck,nguyentruongtho/buck,clonetwin26/buck,brettwooldridge/buck,JoelMarcey/buck,Addepar/buck,romanoid/buck,LegNeato/buck,shs96c/buck,JoelMarcey/buck,rmaz/buck,nguyentruongtho/buck,shybovycha/buck,SeleniumHQ/buck,brettwooldridge/buck,shybovycha/buck,JoelMarcey/buck,clonetwin26/buck,facebook/buck,ilya-klyuchnikov/buck,JoelMarcey/buck,rmaz/buck,romanoid/buck,LegNeato/buck,LegNeato/buck,facebook/buck,facebook/buck,zpao/buck,zpao/buck,SeleniumHQ/buck,Addepar/buck,nguyentruongtho/buck,JoelMarcey/buck,LegNeato/buck,brettwooldridge/buck,facebook/buck,romanoid/buck,Addepar/buck,nguyentruongtho/buck,ilya-klyuchnikov/buck,ilya-klyuchnikov/buck,shybovycha/buck,JoelMarcey/buck,Addepar/buck,romanoid/buck,shs96c/buck,Addepar/buck,zpao/buck,rmaz/buck,Addepar/buck,rmaz/buck,SeleniumHQ/buck,rmaz/buck,brettwooldridge/buck,clonetwin26/buck,clonetwin26/buck,shybovycha/buck,shs96c/buck,SeleniumHQ/buck,Addepar/buck,LegNeato/buck,nguyentruongtho/buck,kageiit/buck,shybovycha/buck,rmaz/buck,zpao/buck,romanoid/buck,clonetwin26/buck,shs96c/buck,ilya-klyuchnikov/buck,shs96c/buck,clonetwin26/buck,LegNeato/buck,facebook/buck,nguyentruongtho/buck,JoelMarcey/buck,shybovycha/buck,kageiit/buck,shybovycha/buck,brettwooldridge/buck,SeleniumHQ/buck,brettwooldridge/buck,brettwooldridge/buck,LegNeato/buck,brettwooldridge/buck,clonetwin26/buck,LegNeato/buck,SeleniumHQ/buck,rmaz/buck,brettwooldridge/buck,LegNeato/buck,kageiit/buck,romanoid/buck,Addepar/buck,brettwooldridge/buck,zpao/buck,rmaz/buck,clonetwin26/buck,shs96c/buck,rmaz/buck,shybovycha/buck,SeleniumHQ/buck,shybovycha/buck,shs96c/buck,kageiit/buck,LegNeato/buck,ilya-klyuchnikov/buck,shybovycha/buck,romanoid/buck,JoelMarcey/buck,clonetwin26/buck,clonetwin26/buck,clonetwin26/buck,facebook/buck,shs96c/buck,Addepar/buck,shybovycha/buck,SeleniumHQ/buck,ilya-klyuchnikov/buck,LegNeato/buck