Precompute the fanout decoding and the oid offset in a pack-*.idx
Precompute the fanout decoding and the oid offset in a pack-*.idx

The fanout table is fairly commonly accessed, we need to read it
twice for each object we lookup in any given pack file.  Most of
the processors running Git are running in little-endian mode, as
they are variants of the x86 platform, so reading the fanout is
a costly operation as we need to convert from network byte order
to local byte order.  By decoding the fanout table into a malloc
obtained buffer we can save these 2 decode operations per lookup
and make search go more quickly.

This also cleans up the initialization of the search functions
by cutting out a few instructions, saving a small amount of time.

Signed-off-by: Shawn O. Pearce <f01032651c12a22b2103346ba96b3b6b231f9d3c@spearce.org>

ardumont/libgit2,mrksrm/Mingijura,t0xicCode/libgit2,maxiaoqian/libgit2,linquize/libgit2,yongthecoder/libgit2,saurabhsuniljain/libgit2,Aorjoa/libgit2_maked_lib,Tousiph/Demo1,stewid/libgit2,nokiddin/libgit2,sygool/libgit2,JIghtuse/libgit2,dleehr/libgit2,t0xicCode/libgit2,spraints/libgit2,chiayolin/libgit2,kenprice/libgit2,dleehr/libgit2,falqas/libgit2,yosefhackmon/libgit2,yongthecoder/libgit2,claudelee/libgit2,maxiaoqian/libgit2,KTXSoftware/libgit2,jflesch/libgit2-mariadb,amyvmiwei/libgit2,Snazz2001/libgit2,rcorre/libgit2,ardumont/libgit2,spraints/libgit2,zodiac/libgit2.js,yosefhackmon/libgit2,magnus98/TEST,jeffhostetler/public_libgit2,ardumont/libgit2,MrHacky/libgit2,sim0629/libgit2,Aorjoa/libgit2_maked_lib,JIghtuse/libgit2,JIghtuse/libgit2,magnus98/TEST,jflesch/libgit2-mariadb,Aorjoa/libgit2_maked_lib,yongthecoder/libgit2,mcanthony/libgit2,skabel/manguse,oaastest/libgit2,since2014/libgit2,JIghtuse/libgit2,mingyaaaa/libgit2,whoisj/libgit2,mingyaaaa/libgit2,since2014/libgit2,kenprice/libgit2,Snazz2001/libgit2,linquize/libgit2,Snazz2001/libgit2,whoisj/libgit2,oaastest/libgit2,swisspol/DEMO-libgit2,leoyanggit/libgit2,amyvmiwei/libgit2,claudelee/libgit2,zodiac/libgit2.js,jeffhostetler/public_libgit2,KTXSoftware/libgit2,mhp/libgit2,Corillian/libgit2,nokiddin/libgit2,skabel/manguse,yosefhackmon/libgit2,dleehr/libgit2,ardumont/libgit2,chiayolin/libgit2,rcorre/libgit2,stewid/libgit2,jflesch/libgit2-mariadb,since2014/libgit2,mhp/libgit2,rcorre/libgit2,evhan/libgit2,JIghtuse/libgit2,raybrad/libit2,dleehr/libgit2,skabel/manguse,jflesch/libgit2-mariadb,amyvmiwei/libgit2,swisspol/DEMO-libgit2,zodiac/libgit2.js,mrksrm/Mingijura,leoyanggit/libgit2,yongthecoder/libgit2,joshtriplett/libgit2,t0xicCode/libgit2,saurabhsuniljain/libgit2,mrksrm/Mingijura,stewid/libgit2,saurabhsuniljain/libgit2,leoyanggit/libgit2,leoyanggit/libgit2,claudelee/libgit2,spraints/libgit2,swisspol/DEMO-libgit2,mcanthony/libgit2,kenprice/libgit2,dleehr/libgit2,jflesch/libgit2-mariadb,jeffhostetler/public_libgit2,KTXSoftware/libgit2,KTXSoftware/libgit2,MrHacky/libgit2,since2014/libgit2,stewid/libgit2,zodiac/libgit2.js,saurabhsuniljain/libgit2,mcanthony/libgit2,chiayolin/libgit2,mrksrm/Mingijura,falqas/libgit2,maxiaoqian/libgit2,kenprice/libgit2,MrHacky/libgit2,nokiddin/libgit2,Tousiph/Demo1,jeffhostetler/public_libgit2,Aorjoa/libgit2_maked_lib,oaastest/libgit2,falqas/libgit2,yongthecoder/libgit2,stewid/libgit2,jeffhostetler/public_libgit2,falqas/libgit2,linquize/libgit2,chiayolin/libgit2,whoisj/libgit2,claudelee/libgit2,whoisj/libgit2,maxiaoqian/libgit2,sim0629/libgit2,swisspol/DEMO-libgit2,falqas/libgit2,falqas/libgit2,joshtriplett/libgit2,swisspol/DEMO-libgit2,evhan/libgit2,sim0629/libgit2,mingyaaaa/libgit2,Tousiph/Demo1,oaastest/libgit2,leoyanggit/libgit2,Snazz2001/libgit2,sygool/libgit2,saurabhsuniljain/libgit2,linquize/libgit2,raybrad/libit2,ardumont/libgit2,dleehr/libgit2,Tousiph/Demo1,jamieleecool/ptest,Snazz2001/libgit2,magnus98/TEST,raybrad/libit2,KTXSoftware/libgit2,claudelee/libgit2,sim0629/libgit2,sygool/libgit2,Aorjoa/libgit2_maked_lib,mingyaaaa/libgit2,magnus98/TEST,nacho/libgit2,iankronquist/libgit2,Corillian/libgit2,kissthink/libgit2,magnus98/TEST,raybrad/libit2,sim0629/libgit2,Corillian/libgit2,KTXSoftware/libgit2,stewid/libgit2,mcanthony/libgit2,mingyaaaa/libgit2,skabel/manguse,amyvmiwei/libgit2,nokiddin/libgit2,nokiddin/libgit2,nacho/libgit2,Tousiph/Demo1,raybrad/libit2,t0xicCode/libgit2,rcorre/libgit2,oaastest/libgit2,mingyaaaa/libgit2,rcorre/libgit2,iankronquist/libgit2,ardumont/libgit2,joshtriplett/libgit2,nacho/libgit2,iankronquist/libgit2,joshtriplett/libgit2,maxiaoqian/libgit2,kissthink/libgit2,spraints/libgit2,sim0629/libgit2,iankronquist/libgit2,t0xicCode/libgit2,yosefhackmon/libgit2,whoisj/libgit2,jflesch/libgit2-mariadb,JIghtuse/libgit2,sygool/libgit2,Corillian/libgit2,linquize/libgit2,maxiaoqian/libgit2,whoisj/libgit2,spraints/libgit2,kenprice/libgit2,mhp/libgit2,mrksrm/Mingijura,skabel/manguse,since2014/libgit2,mcanthony/libgit2,Tousiph/Demo1,Corillian/libgit2,rcorre/libgit2,nokiddin/libgit2,Snazz2001/libgit2,mhp/libgit2,oaastest/libgit2,sygool/libgit2,kenprice/libgit2,nacho/libgit2,kissthink/libgit2,iankronquist/libgit2,sygool/libgit2,claudelee/libgit2,amyvmiwei/libgit2,t0xicCode/libgit2,zodiac/libgit2.js,yosefhackmon/libgit2,evhan/libgit2,jamieleecool/ptest,magnus98/TEST,since2014/libgit2,joshtriplett/libgit2,joshtriplett/libgit2,mcanthony/libgit2,spraints/libgit2,skabel/manguse,jeffhostetler/public_libgit2,mhp/libgit2,chiayolin/libgit2,yosefhackmon/libgit2,amyvmiwei/libgit2,saurabhsuniljain/libgit2,MrHacky/libgit2,jamieleecool/ptest,swisspol/DEMO-libgit2,jamieleecool/ptest,kissthink/libgit2,mhp/libgit2,linquize/libgit2,MrHacky/libgit2,evhan/libgit2,iankronquist/libgit2,chiayolin/libgit2,leoyanggit/libgit2,Corillian/libgit2,MrHacky/libgit2,mrksrm/Mingijura,yongthecoder/libgit2,kissthink/libgit2,kissthink/libgit2