Yet Yet Another Way To Create An Object
Yep, there's still another one: FormatterServices RuntimeHelpers (.NET Core and .NET unified). This one allows one to create an object without running it's constructor... it is used by some of our good friends serializers.
Stopwatch watch = new Stopwatch(); for (Int32 i = 0; i < 100; ++i) { StringBuilder builder = RuntimeHelpers.GetUninitializedObject(typeof(StringBuilder)) as StringBuilder; } Int64 time4 = watch.ElapsedTicks;
Beware, though: because the constructor isn't run (and remember that all fields that are initialized inline are also in fact initialized in the constructor), the object's state may be invalid.
Enough object construction for now...