Optimize collect() performance and memory usage
Optimize collect() performance and memory usage

Use a class type for the accumulator, avoid copying array.

eyu1988/ReactiveCocoa,goodheart/ReactiveCocoa,calebd/ReactiveCocoa,GuitarPlayer-Ma/ReactiveCocoa,hbucius/ReactiveCocoa,yangshengchaoios/ReactiveCocoa,Eveian/ReactiveCocoa,cogddo/ReactiveCocoa,windgo/ReactiveCocoa,Pingco/ReactiveCocoa,smilypeda/ReactiveCocoa,takeshineshiro/ReactiveCocoa,jaylib/ReactiveCocoa,gengjf/ReactiveCocoa,tornade0913/ReactiveCocoa,tonyli508/ReactiveCocoa,zhiwen1024/ReactiveCocoa,hilllinux/ReactiveCocoa,fhchina/ReactiveCocoa,GuitarPlayer-Ma/ReactiveCocoa,takeshineshiro/ReactiveCocoa,Juraldinio/ReactiveCocoa,howandhao/ReactiveCocoa,Juraldinio/ReactiveCocoa,jeelun/ReactiveCocoa,kevin-zqw/ReactiveCocoa,natan/ReactiveCocoa,lixar/ReactiveCocoa,kaylio/ReactiveCocoa,xulibao/ReactiveCocoa,ztchena/ReactiveCocoa,FelixYin66/ReactiveCocoa,icepy/ReactiveCocoa,dachaoisme/ReactiveCocoa,lixar/ReactiveCocoa,JackLian/ReactiveCocoa,xiaoliyang/ReactiveCocoa,bscarano/ReactiveCocoa,jeelun/ReactiveCocoa,yytong/ReactiveCocoa,GuitarPlayer-Ma/ReactiveCocoa,huiping192/ReactiveCocoa,yangyangluoluo/ReactiveCocoa,sdhzwm/ReactiveCocoa,towik/ReactiveCocoa,DreamHill/ReactiveCocoa,OnTheWay1988/ReactiveCocoa,ohwutup/ReactiveCocoa,AndyZhaoHe/ReactiveCocoa,nikita-leonov/ReactiveCocoa,gengjf/ReactiveCocoa,dz1111/ReactiveCocoa,brasbug/ReactiveCocoa,tornade0913/ReactiveCocoa,yizzuide/ReactiveCocoa,xiaobing2007/ReactiveCocoa,hoanganh6491/ReactiveCocoa,LHDsimon/ReactiveCocoa,llb1119/test,zhaoguohui/ReactiveCocoa,paulyoung/ReactiveCocoa,zhenlove/ReactiveCocoa,ReactiveCocoa/ReactiveSwift,Farteen/ReactiveCocoa,natestedman/ReactiveCocoa,zhiwen1024/ReactiveCocoa,JackLian/ReactiveCocoa,tzongw/ReactiveCocoa,Ricowere/ReactiveCocoa,yangyangluoluo/ReactiveCocoa,Ricowere/ReactiveCocoa,hj3938/ReactiveCocoa,luerhouhou/ReactiveCocoa,RuiAAPeres/ReactiveCocoa,calebd/ReactiveCocoa,xiaoliyang/ReactiveCocoa,dskatz22/ReactiveCocoa,victorlin/ReactiveCocoa,clg0118/ReactiveCocoa,takeshineshiro/ReactiveCocoa,kevin-zqw/ReactiveCocoa,SanChain/ReactiveCocoa,Pingco/ReactiveCocoa,richeterre/ReactiveCocoa,valleyman86/ReactiveCocoa,bscarano/ReactiveCocoa,smilypeda/ReactiveCocoa,WEIBP/ReactiveCocoa,RuiAAPeres/ReactiveCocoa,Ray0218/ReactiveCocoa,200895045/ReactiveCocoa,zzqiltw/ReactiveCocoa,mattpetters/ReactiveCocoa,ddc391565320/ReactiveCocoa,jrmiddle/ReactiveCocoa,DreamHill/ReactiveCocoa,ztchena/ReactiveCocoa,chao95957/ReactiveCocoa,almassapargali/ReactiveCocoa,Liquidsoul/ReactiveCocoa,ericzhou2008/ReactiveCocoa,beni55/ReactiveCocoa,valleyman86/ReactiveCocoa,nikita-leonov/ReactiveCocoa,libiao88/ReactiveCocoa,mtxs007/ReactiveCocoa,paulyoung/ReactiveCocoa,cnbin/ReactiveCocoa,leelili/ReactiveCocoa,KuPai32G/ReactiveCocoa,imkerberos/ReactiveCocoa,eyu1988/ReactiveCocoa,natan/ReactiveCocoa,itschaitanya/ReactiveCocoa,yaoxiaoyong/ReactiveCocoa,Eveian/ReactiveCocoa,dskatz22/ReactiveCocoa,BrooksWon/ReactiveCocoa,howandhao/ReactiveCocoa,longv2go/ReactiveCocoa,j364960953/ReactiveCocoa,Rupert-RR/ReactiveCocoa,beni55/ReactiveCocoa,CCOOOOLL/ReactiveCocoa,yonekawa/ReactiveCocoa,xumaolin/ReactiveCocoa,sujeking/ReactiveCocoa,add715/ReactiveCocoa,taylormoonxu/ReactiveCocoa,jam891/ReactiveCocoa,sdhzwm/ReactiveCocoa,esttorhe/ReactiveCocoa,wpstarnice/ReactiveCocoa,CCOOOOLL/ReactiveCocoa,cogddo/ReactiveCocoa,cogddo/ReactiveCocoa,towik/ReactiveCocoa,hbucius/ReactiveCocoa,leichunfeng/ReactiveCocoa,longv2go/ReactiveCocoa,bscarano/ReactiveCocoa,huiping192/ReactiveCocoa,qq644531343/ReactiveCocoa,zzzworm/ReactiveCocoa,on99/ReactiveCocoa,msdgwzhy6/ReactiveCocoa,OneSmallTree/ReactiveCocoa,fanghao085/ReactiveCocoa,sdhzwm/ReactiveCocoa,qq644531343/ReactiveCocoa,Rupert-RR/ReactiveCocoa,ioshger0125/ReactiveCocoa,leelili/ReactiveCocoa,longv2go/ReactiveCocoa,zxq3220122/ReactiveCocoa,esttorhe/ReactiveCocoa,Pingco/ReactiveCocoa,cstars135/ReactiveCocoa,BrooksWon/ReactiveCocoa,ohwutup/ReactiveCocoa,ceekayel/ReactiveCocoa,calebd/ReactiveCocoa,tiger8888/ReactiveCocoa,stupidfive/ReactiveCocoa,paulyoung/ReactiveCocoa,jrmiddle/ReactiveCocoa,jam891/ReactiveCocoa,LHDsimon/ReactiveCocoa,Khan/ReactiveCocoa,zzzworm/ReactiveCocoa,CQXfly/ReactiveCocoa,kiurentu/ReactiveCocoa,loupman/ReactiveCocoa,juliangrosshauser/ReactiveCocoa,liufeigit/ReactiveCocoa,jackywpy/ReactiveCocoa,shuxiashusheng/ReactiveCocoa,nikita-leonov/ReactiveCocoa,zhenlove/ReactiveCocoa,emodeqidao/ReactiveCocoa,msdgwzhy6/ReactiveCocoa,yytong/ReactiveCocoa,shaohung001/ReactiveCocoa,huiping192/ReactiveCocoa,dskatz22/ReactiveCocoa,xiaobing2007/ReactiveCocoa,dachaoisme/ReactiveCocoa,chieryw/ReactiveCocoa,pzw224/ReactiveCocoa,jsslai/ReactiveCocoa,xulibao/ReactiveCocoa,loupman/ReactiveCocoa,alvinvarghese/ReactiveCocoa,mtxs007/ReactiveCocoa,richeterre/ReactiveCocoa,rpowelll/ReactiveCocoa,KuPai32G/ReactiveCocoa,lixar/ReactiveCocoa,chieryw/ReactiveCocoa,KuPai32G/ReactiveCocoa,LHDsimon/ReactiveCocoa,Juraldinio/ReactiveCocoa,Ethan89/ReactiveCocoa,tonyarnold/ReactiveCocoa,dullgrass/ReactiveCocoa,Liquidsoul/ReactiveCocoa,brasbug/ReactiveCocoa,nickcheng/ReactiveCocoa,CCOOOOLL/ReactiveCocoa,pzw224/ReactiveCocoa,BlessNeo/ReactiveCocoa,BlessNeo/ReactiveCocoa,dullgrass/ReactiveCocoa,libiao88/ReactiveCocoa,Farteen/ReactiveCocoa,WEIBP/ReactiveCocoa,tiger8888/ReactiveCocoa,yangshengchaoios/ReactiveCocoa,Ray0218/ReactiveCocoa,yangyangluoluo/ReactiveCocoa,liufeigit/ReactiveCocoa,tzongw/ReactiveCocoa,yoichitgy/ReactiveCocoa,natan/ReactiveCocoa,emodeqidao/ReactiveCocoa,juliangrosshauser/ReactiveCocoa,hj3938/ReactiveCocoa,wpstarnice/ReactiveCocoa,howandhao/ReactiveCocoa,isghe/ReactiveCocoa,jam891/ReactiveCocoa,kaylio/ReactiveCocoa,xiaoliyang/ReactiveCocoa,richeterre/ReactiveCocoa,clg0118/ReactiveCocoa,dullgrass/ReactiveCocoa,buildo/ReactiveCocoa,yoichitgy/ReactiveCocoa,icepy/ReactiveCocoa,cstars135/ReactiveCocoa,ShawnLeee/ReactiveCocoa,jeelun/ReactiveCocoa,shuxiashusheng/ReactiveCocoa,shuxiashusheng/ReactiveCocoa,sandyway/ReactiveCocoa,ceekayel/ReactiveCocoa,kaylio/ReactiveCocoa,taylormoonxu/ReactiveCocoa,FelixYin66/ReactiveCocoa,on99/ReactiveCocoa,OnTheWay1988/ReactiveCocoa,fhchina/ReactiveCocoa,ztchena/ReactiveCocoa,stevielu/ReactiveCocoa,liufeigit/ReactiveCocoa,goodheart/ReactiveCocoa,rpowelll/ReactiveCocoa,add715/ReactiveCocoa,xumaolin/ReactiveCocoa,sugar2010/ReactiveCocoa,yonekawa/ReactiveCocoa,zhaoguohui/ReactiveCocoa,Liquidsoul/ReactiveCocoa,shaohung001/ReactiveCocoa,BrooksWon/ReactiveCocoa,yangshengchaoios/ReactiveCocoa,KJin99/ReactiveCocoa,nickcheng/ReactiveCocoa,yaoxiaoyong/ReactiveCocoa,ShawnLeee/ReactiveCocoa,sugar2010/ReactiveCocoa,buildo/ReactiveCocoa,AlanJN/ReactiveCocoa,yytong/ReactiveCocoa,yizzuide/ReactiveCocoa,sandyway/ReactiveCocoa,tzongw/ReactiveCocoa,eyu1988/ReactiveCocoa,juliangrosshauser/ReactiveCocoa,loupman/ReactiveCocoa,alvinvarghese/ReactiveCocoa,beni55/ReactiveCocoa,icepy/ReactiveCocoa,stevielu/ReactiveCocoa,hoanganh6491/ReactiveCocoa,windgo/ReactiveCocoa,Rupert-RR/ReactiveCocoa,PSPDFKit-labs/ReactiveCocoa,shaohung001/ReactiveCocoa,windgo/ReactiveCocoa,mxxiv/ReactiveCocoa,j364960953/ReactiveCocoa,RuiAAPeres/ReactiveCocoa,jsslai/ReactiveCocoa,zhigang1992/ReactiveCocoa,SanChain/ReactiveCocoa,luerhouhou/ReactiveCocoa,zhiwen1024/ReactiveCocoa,gengjf/ReactiveCocoa,zxq3220122/ReactiveCocoa,hilllinux/ReactiveCocoa,zzqiltw/ReactiveCocoa,victorlin/ReactiveCocoa,mattpetters/ReactiveCocoa,towik/ReactiveCocoa,vincentiss/ReactiveCocoa,Ethan89/ReactiveCocoa,zzzworm/ReactiveCocoa,andersio/ReactiveCocoa,wangqi211/ReactiveCocoa,sujeking/ReactiveCocoa,jaylib/ReactiveCocoa,DongDongDongDong/ReactiveCocoa,dz1111/ReactiveCocoa,mattpetters/ReactiveCocoa,JohnJin007/ReactiveCocoa,walkingsmarts/ReactiveCocoa,Ethan89/ReactiveCocoa,wangqi211/ReactiveCocoa,ceekayel/ReactiveCocoa,zhaoguohui/ReactiveCocoa,SuPair/ReactiveCocoa,natestedman/ReactiveCocoa,leichunfeng/ReactiveCocoa,leelili/ReactiveCocoa,JohnJin007/ReactiveCocoa,alvinvarghese/ReactiveCocoa,jackywpy/ReactiveCocoa,tonyarnold/ReactiveCocoa,hoanganh6491/ReactiveCocoa,AlanJN/ReactiveCocoa,ericzhou2008/ReactiveCocoa,bensonday/ReactiveCocoa,cnbin/ReactiveCocoa,SuPair/ReactiveCocoa,DongDongDongDong/ReactiveCocoa,Khan/ReactiveCocoa,hbucius/ReactiveCocoa,almassapargali/ReactiveCocoa,andersio/ReactiveCocoa,AndyZhaoHe/ReactiveCocoa,DongDongDongDong/ReactiveCocoa,xumaolin/ReactiveCocoa,wangqi211/ReactiveCocoa,leichunfeng/ReactiveCocoa,mxxiv/ReactiveCocoa,zhigang1992/ReactiveCocoa,monkeydbobo/ReactiveCocoa,xulibao/ReactiveCocoa,dachaoisme/ReactiveCocoa,imkerberos/ReactiveCocoa,isghe/ReactiveCocoa,SuPair/ReactiveCocoa,natestedman/ReactiveCocoa,jrmiddle/ReactiveCocoa,PSPDFKit-labs/ReactiveCocoa,esttorhe/ReactiveCocoa,add715/ReactiveCocoa,fhchina/ReactiveCocoa,isghe/ReactiveCocoa,bensonday/ReactiveCocoa,sugar2010/ReactiveCocoa,cstars135/ReactiveCocoa,chao95957/ReactiveCocoa,dz1111/ReactiveCocoa,clg0118/ReactiveCocoa,chao95957/ReactiveCocoa,ddc391565320/ReactiveCocoa,llb1119/test,PSPDFKit-labs/ReactiveCocoa,jsslai/ReactiveCocoa,ikesyo/ReactiveCocoa,OneSmallTree/ReactiveCocoa,sujeking/ReactiveCocoa,Farteen/ReactiveCocoa,tiger8888/ReactiveCocoa,monkeydbobo/ReactiveCocoa,walkingsmarts/ReactiveCocoa,fanghao085/ReactiveCocoa,FelixYin66/ReactiveCocoa,zhukaixy/ReactiveCocoa,KJin99/ReactiveCocoa,taylormoonxu/ReactiveCocoa,brasbug/ReactiveCocoa,buildo/ReactiveCocoa,monkeydbobo/ReactiveCocoa,stupidfive/ReactiveCocoa,xiaobing2007/ReactiveCocoa,zhukaixy/ReactiveCocoa,200895045/ReactiveCocoa,nickcheng/ReactiveCocoa,valleyman86/ReactiveCocoa,fanghao085/ReactiveCocoa,Khan/ReactiveCocoa,jaylib/ReactiveCocoa,bensonday/ReactiveCocoa,luerhouhou/ReactiveCocoa,ohwutup/ReactiveCocoa,itschaitanya/ReactiveCocoa,msdgwzhy6/ReactiveCocoa,JohnJin007/ReactiveCocoa,yizzuide/ReactiveCocoa,zhukaixy/ReactiveCocoa,Ray0218/ReactiveCocoa,cnbin/ReactiveCocoa,AndyZhaoHe/ReactiveCocoa,vincentiss/ReactiveCocoa,CQXfly/ReactiveCocoa,KJin99/ReactiveCocoa,huiping192/ReactiveCocoa,WEIBP/ReactiveCocoa,DreamHill/ReactiveCocoa,ikesyo/ReactiveCocoa,on99/ReactiveCocoa,nickcheng/ReactiveCocoa,goodheart/ReactiveCocoa,victorlin/ReactiveCocoa,Eveian/ReactiveCocoa,OneSmallTree/ReactiveCocoa,AlanJN/ReactiveCocoa,mtxs007/ReactiveCocoa,ReactiveCocoa/ReactiveSwift,tornade0913/ReactiveCocoa,smilypeda/ReactiveCocoa,ioshger0125/ReactiveCocoa,pzw224/ReactiveCocoa,yonekawa/ReactiveCocoa,itschaitanya/ReactiveCocoa,ioshger0125/ReactiveCocoa,walkingsmarts/ReactiveCocoa,200895045/ReactiveCocoa,yoichitgy/ReactiveCocoa,Ricowere/ReactiveCocoa,llb1119/test,vincentiss/ReactiveCocoa,chieryw/ReactiveCocoa,almassapargali/ReactiveCocoa,tonyarnold/ReactiveCocoa,zhenlove/ReactiveCocoa,ddc391565320/ReactiveCocoa,BlessNeo/ReactiveCocoa,kevin-zqw/ReactiveCocoa,ShawnLeee/ReactiveCocoa,mxxiv/ReactiveCocoa,hilllinux/ReactiveCocoa,qq644531343/ReactiveCocoa,ReactiveCocoa/ReactiveSwift,jackywpy/ReactiveCocoa,sandyway/ReactiveCocoa,wpstarnice/ReactiveCocoa,emodeqidao/ReactiveCocoa,JackLian/ReactiveCocoa,zhigang1992/ReactiveCocoa,stupidfive/ReactiveCocoa,SanChain/ReactiveCocoa,ericzhou2008/ReactiveCocoa,rpowelll/ReactiveCocoa,Ricowere/ReactiveCocoa,libiao88/ReactiveCocoa,esttorhe/ReactiveCocoa,andersio/ReactiveCocoa,j364960953/ReactiveCocoa,jaylib/ReactiveCocoa,CQXfly/ReactiveCocoa,OnTheWay1988/ReactiveCocoa,zxq3220122/ReactiveCocoa,kiurentu/ReactiveCocoa,kiurentu/ReactiveCocoa,imkerberos/ReactiveCocoa,yaoxiaoyong/ReactiveCocoa,zzqiltw/ReactiveCocoa,tonyli508/ReactiveCocoa,tonyli508/ReactiveCocoa,hj3938/ReactiveCocoa,stevielu/ReactiveCocoa