Always snap to grid
UE3 talk:Insertion Sort Macro
From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 12:49, 16 September 2009 by Elmuerte (Talk | contribs) (Created page with '== Possible Optimization == Right now within the inner loop it compares the two elements 3 times. A == B, A > B, B > A. But general rules dictate, that if !(A > B), and !(B > A)…')
Possible Optimization
Right now within the inner loop it compares the two elements 3 times. A == B, A > B, B > A. But general rules dictate, that if !(A > B), and !(B > A) then it must be A == B, right? (As also explained in the document). So the first compare is actually not needed, thus reducing the requirement for a additional operator to implement for custom types. Is my assumption correct? --Elmuerte 19:49, 16 September 2009 (UTC)