Re: StringBuilder Extension: IsQuotedBy
Sébastien Lorion <[email protected]> Thu, 14 Feb 2008 23:51:43 -0500
| Newsgroups | gmane.comp.windows.devel.dotnet.clr |
|---|---|
| Message-ID | <[email protected]> |
I did use the word "tight" ... 100 ns in a loop taking 500 ns is still 20%. If you can take the allocation out of the loop, you just got a nice save. And as far as I know, there is no reason to create objects in a hashing function. You may say, this is for edge cases. Yes and no ... If object allocation was free, there would be no StringBuilder in the first place and it would not have a constructor asking for its initial size, etc. Sébastien On 2/14/08, Per Bolmstedt <[email protected]> wrote: > On Thu, 14 Feb 2008 11:42:01 -0500, =?ISO-8859-1?Q?S=E9bastien_Lorion?= > > <[email protected]> wrote: > > > > Allocating objects in a tight loop or methods like GetHashCode() > > is still a big nono ... > > > Why? See Chris' recent post, for example. Repeating the mantra isn't really > helping. =] > > > =================================== > This list is hosted by DevelopMentor(R) http://www.develop.com > > View archives and manage your subscription(s) at http://discuss.develop.com > -- Sébastien www.sebastienlorion.com =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com