[Mono-dev] [PATCH] Fold a + 'b' + c to a + "b" + c in mcs
Ben Maurer
bmaurer at ximian.com
Mon Oct 10 22:11:59 EDT 2005
Today I noticed a perf issue in corlib in a place where we did a + 'b' +
c. The constant char in this case needs to be boxed and a string
allocated for its value. A better way to write this is a + "b" + c,
which saves two allocations.
The attached patch does this at the mcs level. The pattern occurs a few
times in the mono classlibs, so this appears to be generally useful.
-- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mcs-string-fold-char.patch
Type: text/x-patch
Size: 1201 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20051010/d02ef2fb/attachment.bin
More information about the Mono-devel-list
mailing list