Task manager model: Make a find quicker.
Task manager model: Make a find quicker.

Given a list such as

00000222223333

and an index i into that list, find the first occurrence of the value of list[i]. The current code just does a plain search. The new code does a reverse search starting at i.

The reason I am bothering to optimize this is because it is used in TaskManagerGtk::CompareImpl, pending my other cl.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/553155

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@37726 0039d316-1c4b-4281-b951-d872f2087c98

Just-D/chromium-1,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,nacl-webkit/chrome_deps,littlstar/chromium.src,fujunwei/chromium-crosswalk,patrickm/chromium.src,bright-sparks/chromium-spacewalk,zcbenz/cefode-chromium,jaruba/chromium.src,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,rogerwang/chromium,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,keishi/chromium,rogerwang/chromium,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,M4sse/chromium.src,M4sse/chromium.src,M4sse/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,robclark/chromium,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,jaruba/chromium.src,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,robclark/chromium,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,anirudhSK/chromium,hujiajie/pa-chromium,nacl-webkit/chrome_deps,anirudhSK/chromium,Pluto-tv/chromium-crosswalk,rogerwang/chromium,M4sse/chromium.src,Jonekee/chromium.src,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,markYoungH/chromium.src,zcbenz/cefode-chromium,Chilledheart/chromium,Chilledheart/chromium,M4sse/chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,TheTypoMaster/chromium-crosswalk,rogerwang/chromium,hgl888/chromium-crosswalk,patrickm/chromium.src,dednal/chromium.src,Pluto-tv/chromium-crosswalk,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,markYoungH/chromium.src,M4sse/chromium.src,nacl-webkit/chrome_deps,hujiajie/pa-chromium,dushu1203/chromium.src,nacl-webkit/chrome_deps,rogerwang/chromium,fujunwei/chromium-crosswalk,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,robclark/chromium,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,Chilledheart/chromium,bright-sparks/chromium-spacewalk,ltilve/chromium,Jonekee/chromium.src,timopulkkinen/BubbleFish,jaruba/chromium.src,Fireblend/chromium-crosswalk,zcbenz/cefode-chromium,axinging/chromium-crosswalk,ondra-novak/chromium.src,Jonekee/chromium.src,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,dednal/chromium.src,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,robclark/chromium,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,dednal/chromium.src,nacl-webkit/chrome_deps,ondra-novak/chromium.src,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,Jonekee/chromium.src,ondra-novak/chromium.src,chuan9/chromium-crosswalk,markYoungH/chromium.src,ltilve/chromium,Chilledheart/chromium,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,jaruba/chromium.src,dushu1203/chromium.src,keishi/chromium,hgl888/chromium-crosswalk,littlstar/chromium.src,TheTypoMaster/chromium-crosswalk,patrickm/chromium.src,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,rogerwang/chromium,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,anirudhSK/chromium,fujunwei/chromium-crosswalk,junmin-zhu/chromium-rivertrail,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,keishi/chromium,Just-D/chromium-1,Just-D/chromium-1,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,zcbenz/cefode-chromium,crosswalk-project/chromium-crosswalk-efl,robclark/chromium,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,keishi/chromium,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,anirudhSK/chromium,hujiajie/pa-chromium,Jonekee/chromium.src,hgl888/chromium-crosswalk,junmin-zhu/chromium-rivertrail,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,dednal/chromium.src,patrickm/chromium.src,anirudhSK/chromium,zcbenz/cefode-chromium,robclark/chromium,markYoungH/chromium.src,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,junmin-zhu/chromium-rivertrail,keishi/chromium,keishi/chromium,littlstar/chromium.src,junmin-zhu/chromium-rivertrail,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,rogerwang/chromium,chuan9/chromium-crosswalk,anirudhSK/chromium,keishi/chromium,anirudhSK/chromium,zcbenz/cefode-chromium,keishi/chromium,jaruba/chromium.src,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,ltilve/chromium,nacl-webkit/chrome_deps,Just-D/chromium-1,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,patrickm/chromium.src,littlstar/chromium.src,Just-D/chromium-1,anirudhSK/chromium,dushu1203/chromium.src,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,patrickm/chromium.src,anirudhSK/chromium,zcbenz/cefode-chromium,hgl888/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,keishi/chromium,fujunwei/chromium-crosswalk,dushu1203/chromium.src,hujiajie/pa-chromium,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,keishi/chromium,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,dushu1203/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,ltilve/chromium,pozdnyakov/chromium-crosswalk,dednal/chromium.src,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,hgl888/chromium-crosswalk,markYoungH/chromium.src,M4sse/chromium.src,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,ltilve/chromium,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk,anirudhSK/chromium,hujiajie/pa-chromium,Chilledheart/chromium,anirudhSK/chromium,keishi/chromium,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,rogerwang/chromium,Pluto-tv/chromium-crosswalk,dednal/chromium.src,mogoweb/chromium-crosswalk,rogerwang/chromium,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,ltilve/chromium,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,robclark/chromium,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,Just-D/chromium-1,ondra-novak/chromium.src,littlstar/chromium.src,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,ondra-novak/chromium.src,hujiajie/pa-chromium,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,littlstar/chromium.src,zcbenz/cefode-chromium,dushu1203/chromium.src,ondra-novak/chromium.src,Chilledheart/chromium,ondra-novak/chromium.src,chuan9/chromium-crosswalk,littlstar/chromium.src,mogoweb/chromium-crosswalk,timopulkkinen/BubbleFish,dushu1203/chromium.src,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,ChromiumWebApps/chromium,markYoungH/chromium.src,ltilve/chromium,ChromiumWebApps/chromium,robclark/chromium,mogoweb/chromium-crosswalk,Jonekee/chromium.src,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,patrickm/chromium.src,M4sse/chromium.src,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,nacl-webkit/chrome_deps,robclark/chromium,Chilledheart/chromium,markYoungH/chromium.src,robclark/chromium,dednal/chromium.src,zcbenz/cefode-chromium,rogerwang/chromium,markYoungH/chromium.src