[Mono-devel-list] StringBuilder patch

Paolo Molaro lupus at ximian.com
Wed Jan 14 09:41:44 EST 2004


On 01/13/04 Piers Haken wrote:
> Yeah, you could certainly apply this optimization in a few limited cases
> during peephole. However, I believe you'd be able to do this (and similar
> optimizations) in more complex cases like...
> 
> 	if (c == 7)
> 		return obj.method (1);
> 	else
> 		return obj.method (19);
> 
> ...if you had some kind of higher-level branch analysis that occurred
> earlier in the process. I'm not sure if burg would be useful for this or
[...]

That is a form of code hoisting: it's an optimization that may or may
not improve performance (though it usually reduces code size).
Since it's probably not going to give big improvements, it's not in our
immediate plans to implement, though, as always, if someone wants to
try it an post some numbers, it will be welcome.

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better



More information about the Mono-devel-list mailing list