Jeremiah Clark's Blog

A place to collect my ramblings about Microsoft and the .NET Framework.

Browse by Tags

Tagged Content List
  • Blog Post: Provide Caching For Your Complex Functions

    Function caching, or more specifically memoization , is a code optimization technique that can be used to speed up code that calls complex functions with the same inputs.  Let's take a look at the classic fibonacci function: 1: private int Fib( int val) 2: { 3: return val <= 2 ? 1 ...
  • Blog Post: SQL: If Exists Update Else Insert

    This is a pretty common situation that comes up when performing database operations. A stored procedure is called and the data needs to be updated if it already exists and inserted if it does not. If we refer to the Books Online documentation, it gives examples that are similar to: IF EXISTS (SELECT...
  • Blog Post: StringBuilder.ToString() vs Reflection

    I had an intriguing conversation with a friend on Friday about the performance of using the StringBuilder.ToString() method to return the value of the String contained in the StringBuilder object. Following this conversation, I decided to take a deeper look at how StringBuilder works. Here is the StringBuilder...
Page 1 of 1 (3 items)