Feng Yuan (袁峰)

CLR, Performance, Debugging, Parallel Computing, WPF, XPS, GDI, GDI+, Printing (www.fengyuan.com)

Browse by Tags

Tagged Content List
  • Blog Post: Performance Tips: Faster than StringBuilder?

    The web has tons of articles about how StringBuilder is much faster than string concatenation using '+' operator or String.Concat functions when there are enough strings to ber merged. Here is an MSDN article on this topic: http://support.microsoft.com/kb/306822 But actually, if all you want is concatenating...
  • Blog Post: Performance Tips: String.Split

    String.Split methods are provided in .Net as a convenient way of dividing string into parts. Here are two basic forms of String.Split methods: public string [] Split( char [] separator, int count, StringSplitOptions options); public string [] Split( string [] separator, int count, StringSplitOptions...
  • Blog Post: TextWriter.WriteLine(string, object[]) in less memory, less time

    I found myself increasingly generating reports in .csv format, and then use Excel to analyze the reports. With large amount of data written to the .csv file, file generation time becomes more and more noticable. So I took some time to check what is taking so much time and how can it be reduced. For...
  • Blog Post: Problem: Better way to remove characters that aren't 32 to 175

    There is a question on StackOverflow.com about better ways to remove characters in a string that are outside the range of 32 to 175. Quite a few fancy solutions are provided: Regex . Replace ( myString , @"[^\x20-\xaf]+" , "" ); new string ( myString . Where ( c => ( c >= 32 ) &&...
  • Blog Post: Improving CLRProfiler 4: Reducing SampleObject memory consumption by 58%

    In the previous three posts, we managed to double the speed of file loading time of CLRProfiler through profile-guided optimization in three simple steps. Now let's take a look at reducing CLRProfiler's memory consumption, making it more useful to real world applications. I managed to create a 10...
  • Blog Post: Improving CLRProfiler 3: Double the speed of profile loading

    In the first step of profile-guided optimization, we reduced tatal CPU sample of ReadNewLog.ReadFile from 6,223 samples to 5,803 samples; the second step reduced it further to 3,982. Would it be nice if we can reduce it to below 3,111 samples, essentially doubling the speed of CLRProfiler's profile loading...
  • Blog Post: Improving CLRProfiler 2: 19.7% in TryGetValue

    Playing with Visual Studio 2010 profiler data Function Code View finds another easy target for improvement: 19.7% in calling TryGetValue on a Dictionary object: This piece of code is called in 'c' command process for logged method call information. There are just millions of method calls in the...
  • Blog Post: Improving CLRProfiler 1: 8.4% Progress Bar Update

    Being a CLR performance dev, it seems that CLR profiler will be a very useful. So now I'm trying to understand it inside out, and may be even make some improvement to it. Here are the steps I'm taking: Download CLR profiler 4.0 source code. Unzip, open solution using Visual Studio 2010, making...
  • Blog Post: New Job: CLR performance team

    I switched job to CLR performance team last August. Now I'm working on something which has huge customer impact, needs tons of technical depth, and fits my long time passion as an old practicing programmer (I still have 30-year source code listing from my college senior year to proof it). This...
Page 1 of 1 (9 items)