Reduce the number of conversions between String and UTF16 when performing string to int conversions.
Reduce the number of conversions between String and UTF16 when performing string to int conversions.

Those conversions are supposed to be very cheap, but they don't get optimized away yet. Therefore, perform the String to utf16 conversion only once and then reuse it.

This change together with the previous patch which gets rid of a closure inside UTF16View brings the performance of the regressed StrToInt benchmark back to normal.

Swift SVN r25780

CodaFi/swift,xedin/swift,milseman/swift,gmilos/swift,natecook1000/swift,LeoShimonaka/swift,emilstahl/swift,swiftix/swift.old,tjw/swift,xedin/swift,atrick/swift,natecook1000/swift,IngmarStein/swift,dduan/swift,tjw/swift,kperryua/swift,KrishMunot/swift,khizkhiz/swift,IngmarStein/swift,ahoppen/swift,uasys/swift,airspeedswift/swift,arvedviehweger/swift,CodaFi/swift,stephentyrone/swift,cbrentharris/swift,deyton/swift,JaSpa/swift,JaSpa/swift,stephentyrone/swift,tkremenek/swift,brentdax/swift,parkera/swift,cbrentharris/swift,airspeedswift/swift,Jnosh/swift,shajrawi/swift,codestergit/swift,manavgabhawala/swift,natecook1000/swift,emilstahl/swift,stephentyrone/swift,manavgabhawala/swift,tinysun212/swift-windows,return/swift,ahoppen/swift,gottesmm/swift,calebd/swift,gottesmm/swift,arvedviehweger/swift,zisko/swift,nathawes/swift,sdulal/swift,hughbe/swift,mightydeveloper/swift,slavapestov/swift,gribozavr/swift,LeoShimonaka/swift,JGiola/swift,airspeedswift/swift,shajrawi/swift,slavapestov/swift,hooman/swift,deyton/swift,ken0nek/swift,ken0nek/swift,felix91gr/swift,jckarter/swift,djwbrown/swift,parkera/swift,jopamer/swift,sdulal/swift,djwbrown/swift,brentdax/swift,harlanhaskins/swift,russbishop/swift,kentya6/swift,milseman/swift,johnno1962d/swift,codestergit/swift,MukeshKumarS/Swift,austinzheng/swift,huonw/swift,sschiau/swift,apple/swift,harlanhaskins/swift,arvedviehweger/swift,tjw/swift,sschiau/swift,rudkx/swift,johnno1962d/swift,practicalswift/swift,dduan/swift,rudkx/swift,tinysun212/swift-windows,amraboelela/swift,jtbandes/swift,Jnosh/swift,manavgabhawala/swift,therealbnut/swift,frootloops/swift,zisko/swift,gribozavr/swift,frootloops/swift,kperryua/swift,adrfer/swift,kperryua/swift,jmgc/swift,SwiftAndroid/swift,mightydeveloper/swift,hooman/swift,kstaring/swift,khizkhiz/swift,austinzheng/swift,alblue/swift,roambotics/swift,karwa/swift,gmilos/swift,karwa/swift,kentya6/swift,kentya6/swift,Ivacker/swift,bitjammer/swift,xedin/swift,benlangmuir/swift,codestergit/swift,therealbnut/swift,ken0nek/swift,zisko/swift,russbishop/swift,tardieu/swift,KrishMunot/swift,shajrawi/swift,uasys/swift,ben-ng/swift,kstaring/swift,slavapestov/swift,benlangmuir/swift,johnno1962d/swift,Jnosh/swift,xedin/swift,jtbandes/swift,JaSpa/swift,khizkhiz/swift,kusl/swift,LeoShimonaka/swift,OscarSwanros/swift,apple/swift,zisko/swift,IngmarStein/swift,aschwaighofer/swift,ken0nek/swift,CodaFi/swift,KrishMunot/swift,ahoppen/swift,rudkx/swift,harlanhaskins/swift,Jnosh/swift,ahoppen/swift,shajrawi/swift,glessard/swift,parkera/swift,austinzheng/swift,russbishop/swift,kusl/swift,hughbe/swift,tinysun212/swift-windows,kstaring/swift,uasys/swift,gottesmm/swift,russbishop/swift,karwa/swift,Jnosh/swift,swiftix/swift.old,jtbandes/swift,johnno1962d/swift,xwu/swift,adrfer/swift,khizkhiz/swift,dduan/swift,khizkhiz/swift,sschiau/swift,natecook1000/swift,brentdax/swift,uasys/swift,devincoughlin/swift,felix91gr/swift,tardieu/swift,atrick/swift,austinzheng/swift,alblue/swift,jckarter/swift,apple/swift,frootloops/swift,therealbnut/swift,airspeedswift/swift,kusl/swift,tinysun212/swift-windows,glessard/swift,SwiftAndroid/swift,uasys/swift,allevato/swift,danielmartin/swift,djwbrown/swift,deyton/swift,allevato/swift,rudkx/swift,SwiftAndroid/swift,hughbe/swift,gottesmm/swift,swiftix/swift.old,gribozavr/swift,xwu/swift,austinzheng/swift,djwbrown/swift,tkremenek/swift,danielmartin/swift,gregomni/swift,JGiola/swift,practicalswift/swift,ken0nek/swift,harlanhaskins/swift,gregomni/swift,modocache/swift,shahmishal/swift,aschwaighofer/swift,glessard/swift,xwu/swift,ben-ng/swift,glessard/swift,OscarSwanros/swift,brentdax/swift,allevato/swift,tinysun212/swift-windows,devincoughlin/swift,gottesmm/swift,ahoppen/swift,shajrawi/swift,dreamsxin/swift,rudkx/swift,karwa/swift,russbishop/swift,tardieu/swift,parkera/swift,nathawes/swift,emilstahl/swift,kentya6/swift,sschiau/swift,JGiola/swift,hooman/swift,aschwaighofer/swift,stephentyrone/swift,allevato/swift,austinzheng/swift,modocache/swift,alblue/swift,codestergit/swift,frootloops/swift,shahmishal/swift,aschwaighofer/swift,swiftix/swift,devincoughlin/swift,arvedviehweger/swift,jtbandes/swift,slavapestov/swift,jckarter/swift,sdulal/swift,JGiola/swift,stephentyrone/swift,modocache/swift,gribozavr/swift,arvedviehweger/swift,shahmishal/swift,adrfer/swift,frootloops/swift,OscarSwanros/swift,jtbandes/swift,karwa/swift,harlanhaskins/swift,jckarter/swift,sschiau/swift,hughbe/swift,practicalswift/swift,therealbnut/swift,airspeedswift/swift,practicalswift/swift,aschwaighofer/swift,parkera/swift,uasys/swift,natecook1000/swift,alblue/swift,kstaring/swift,return/swift,tardieu/swift,gregomni/swift,jopamer/swift,harlanhaskins/swift,danielmartin/swift,Ivacker/swift,CodaFi/swift,hughbe/swift,cbrentharris/swift,jckarter/swift,airspeedswift/swift,IngmarStein/swift,xedin/swift,gottesmm/swift,tjw/swift,kusl/swift,xwu/swift,nathawes/swift,calebd/swift,shajrawi/swift,alblue/swift,karwa/swift,johnno1962d/swift,felix91gr/swift,shajrawi/swift,ken0nek/swift,tjw/swift,sdulal/swift,russbishop/swift,kstaring/swift,calebd/swift,dreamsxin/swift,devincoughlin/swift,mightydeveloper/swift,MukeshKumarS/Swift,apple/swift,shahmishal/swift,alblue/swift,brentdax/swift,uasys/swift,swiftix/swift.old,JaSpa/swift,kperryua/swift,apple/swift,sschiau/swift,kentya6/swift,danielmartin/swift,sdulal/swift,practicalswift/swift,arvedviehweger/swift,ben-ng/swift,hooman/swift,swiftix/swift,brentdax/swift,dduan/swift,swiftix/swift.old,Ivacker/swift,adrfer/swift,KrishMunot/swift,emilstahl/swift,swiftix/swift.old,gmilos/swift,deyton/swift,sdulal/swift,practicalswift/swift,tkremenek/swift,bitjammer/swift,bitjammer/swift,huonw/swift,SwiftAndroid/swift,tkremenek/swift,milseman/swift,Ivacker/swift,lorentey/swift,kperryua/swift,benlangmuir/swift,atrick/swift,codestergit/swift,gmilos/swift,Ivacker/swift,huonw/swift,IngmarStein/swift,roambotics/swift,cbrentharris/swift,lorentey/swift,tardieu/swift,emilstahl/swift,glessard/swift,kentya6/swift,swiftix/swift.old,manavgabhawala/swift,khizkhiz/swift,dduan/swift,CodaFi/swift,CodaFi/swift,MukeshKumarS/Swift,emilstahl/swift,benlangmuir/swift,kperryua/swift,danielmartin/swift,dduan/swift,manavgabhawala/swift,xwu/swift,lorentey/swift,kentya6/swift,djwbrown/swift,ben-ng/swift,gregomni/swift,bitjammer/swift,hughbe/swift,xedin/swift,LeoShimonaka/swift,shahmishal/swift,rudkx/swift,tkremenek/swift,slavapestov/swift,practicalswift/swift,xwu/swift,zisko/swift,bitjammer/swift,hooman/swift,karwa/swift,felix91gr/swift,kusl/swift,xedin/swift,jckarter/swift,amraboelela/swift,OscarSwanros/swift,return/swift,allevato/swift,mightydeveloper/swift,bitjammer/swift,milseman/swift,nathawes/swift,jopamer/swift,devincoughlin/swift,brentdax/swift,IngmarStein/swift,lorentey/swift,lorentey/swift,parkera/swift,felix91gr/swift,zisko/swift,djwbrown/swift,jopamer/swift,manavgabhawala/swift,tjw/swift,nathawes/swift,glessard/swift,JGiola/swift,therealbnut/swift,gribozavr/swift,amraboelela/swift,JGiola/swift,jmgc/swift,MukeshKumarS/Swift,huonw/swift,deyton/swift,harlanhaskins/swift,modocache/swift,tkremenek/swift,alblue/swift,swiftix/swift,ahoppen/swift,LeoShimonaka/swift,IngmarStein/swift,milseman/swift,parkera/swift,gribozavr/swift,Ivacker/swift,amraboelela/swift,gregomni/swift,ken0nek/swift,kstaring/swift,ben-ng/swift,tjw/swift,tardieu/swift,tardieu/swift,mightydeveloper/swift,sschiau/swift,LeoShimonaka/swift,allevato/swift,gribozavr/swift,jopamer/swift,hughbe/swift,stephentyrone/swift,jmgc/swift,johnno1962d/swift,manavgabhawala/swift,roambotics/swift,johnno1962d/swift,devincoughlin/swift,return/swift,tkremenek/swift,felix91gr/swift,return/swift,djwbrown/swift,frootloops/swift,jopamer/swift,modocache/swift,LeoShimonaka/swift,JaSpa/swift,Ivacker/swift,SwiftAndroid/swift,Ivacker/swift,tinysun212/swift-windows,return/swift,cbrentharris/swift,jmgc/swift,swiftix/swift,shahmishal/swift,jmgc/swift,gottesmm/swift,kentya6/swift,jopamer/swift,amraboelela/swift,jmgc/swift,mightydeveloper/swift,atrick/swift,ben-ng/swift,nathawes/swift,bitjammer/swift,gmilos/swift,ben-ng/swift,danielmartin/swift,return/swift,parkera/swift,natecook1000/swift,stephentyrone/swift,milseman/swift,gmilos/swift,devincoughlin/swift,modocache/swift,kstaring/swift,LeoShimonaka/swift,swiftix/swift,lorentey/swift,cbrentharris/swift,emilstahl/swift,OscarSwanros/swift,russbishop/swift,slavapestov/swift,practicalswift/swift,cbrentharris/swift,benlangmuir/swift,calebd/swift,xedin/swift,swiftix/swift,lorentey/swift,natecook1000/swift,CodaFi/swift,kusl/swift,cbrentharris/swift,atrick/swift,amraboelela/swift,calebd/swift,swiftix/swift,codestergit/swift,xwu/swift,huonw/swift,karwa/swift,austinzheng/swift,atrick/swift,felix91gr/swift,kusl/swift,calebd/swift,sdulal/swift,kusl/swift,huonw/swift,emilstahl/swift,apple/swift,tinysun212/swift-windows,sschiau/swift,shajrawi/swift,adrfer/swift,huonw/swift,danielmartin/swift,SwiftAndroid/swift,mightydeveloper/swift,adrfer/swift,codestergit/swift,gmilos/swift,khizkhiz/swift,shahmishal/swift,lorentey/swift,benlangmuir/swift,KrishMunot/swift,swiftix/swift.old,gregomni/swift,OscarSwanros/swift,deyton/swift,calebd/swift,roambotics/swift,roambotics/swift,Jnosh/swift,modocache/swift,jtbandes/swift,hooman/swift,aschwaighofer/swift,sdulal/swift,shahmishal/swift,JaSpa/swift,mightydeveloper/swift,hooman/swift,frootloops/swift,MukeshKumarS/Swift,nathawes/swift,roambotics/swift,jmgc/swift,KrishMunot/swift,SwiftAndroid/swift,adrfer/swift,deyton/swift,therealbnut/swift,therealbnut/swift,airspeedswift/swift,kperryua/swift,gribozavr/swift,JaSpa/swift,aschwaighofer/swift,Jnosh/swift,slavapestov/swift,dduan/swift,amraboelela/swift,jtbandes/swift,zisko/swift,jckarter/swift,milseman/swift,arvedviehweger/swift,KrishMunot/swift,MukeshKumarS/Swift,MukeshKumarS/Swift,allevato/swift,devincoughlin/swift,OscarSwanros/swift