[Mono-bugs] [Bug 74014][Nor] Changed - Method BitConverter.ToString() runs very very slow (possible string concatention bug)
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 23 Mar 2005 10:57:45 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by dezelin@gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=74014
--- shadow/74014 2005-03-23 09:44:00.000000000 -0500
+++ shadow/74014.tmp.25974 2005-03-23 10:57:45.000000000 -0500
@@ -69,6 +69,20 @@
The patch
------- Additional Comments From lupus@ximian.com 2005-03-23 09:44 -------
It would be better to use a StringBuilder in this case, just make sure
you create it with the full size.
+
+------- Additional Comments From dezelin@gmail.com 2005-03-23 10:57 -------
+This way it consumes less memory and is faster than with StringBuilder
+- less memory is allocated and you don't have to make a call to
+StringBuilder.Append for every byte in the array * 3. Also
+StringBuilder is from the System.dll it's not in the mscorlib!
+
+But of course, if you still think that using StringBuilder is the
+preferred way, I will send you the patch.
+
+Cheers,
+Aleksandar Dezelin
+
+