Faster version of Convert.ChangeType
<p>In an application that I have, I am doing quite frequent calls to <code>Convert.ChangeType</code> in order to convert a value to a dynamically loaded type.  </p>

<p>However, after profiling with ANTS, I've found that this <code>Convert.ChangeType</code> seems to take a significant portion of time (due to being called quite often).  Does anyone have a faster alternative to doing this?</p>

<p>At this point I have a type object containing the target, and a <code>string</code> containing the value.</p>

<p>The following is the offending code.  I was considering doing a switch-statement on type (since it is a limited collection of types) and calling the parse methods, though I'm not sure whether or not that'll be faster.</p>

<pre><code>if(attributeRow["Value"]!=DBNull.Value)
    sample[attr] = attr.AttributeType == typeof(Guid)
                 ? new Guid(attributeRow["Value"].ToString())
                 : (IComparable)Convert.ChangeType(attributeRow["Value"],attr.AttributeType);
</code></pre>
