Please consider revamping NinjaTrader's codebase to make use of System.Collections.Generic vs. System.Collections. It should be more performant. A search thru NT 7 beta 14 code yields only @VolumeProfile.cs as making use of System.Collections.Generic whereas the following all use the older/slower System.Collections: @BuySellVolume.cs, @Swing.cs, @T3.cs, @ZigZag.cs, @BarsTypes.cs, @ChartStyles.cs, @TextImportType.cs. I'm sure other collections code is used behind the NinjaTrader engine and would hope that this would too be improved to help the overall speediness of NT.
Quote from Skeet's book:
Performance is improved most radically when it comes to value types, which no longer need to be boxed and unboxed when they’re used in strongly typed generic APIs, particularly the generic collection types provided in .NET 2.0. Performance with reference types is usually improved but only slightly.
Your code is able to express its intention more clearly using generics—instead of a comment or a long variable name required to describe exactly what types are involved, the details of the type itself can do the work. Comments and variable names can often become inaccurate over time, as they can be left alone when code is changed—but the type information is “correct” by definition.
JD
Comment