Tags: CyberShadow/ae
Tags
[BREAKING] ae.utils.rangeassoc: Re-implement using a RedBlackTree New major iteration of IntervalAssocArray: - A RedBlackTree is now used to store the spans - Slicing is now O(1) (use .dup to get a shallow copy instead) - "scan" is no longer necessary, just use foreach over a slice - "update" is no longer necessary, just use foreach with ref Rationale: - Initial version was a placeholder, using a very basic data internal structure and algorithms. As expected, this led to poor performance in real-world use cases. - The "scan" and "update" methods were a suboptimal interface, which did not follow any established D conventions. Changes required: - Replace "scan" calls with foreach loops over a slice of the array - Replace "update" calls with foreach loops which modify the value with "ref" - Replace slicing (when used to get a shallow copy) with "dup" See unit test changes for examples.
ae.utils.main: Allow overriding whether to print the stack trace The semantics of "debug" aren't quite fully formally defined, so it could be used to mean anything between "this build has debug information" to "enable additional debug features that should not normally be enabled". An additional factor is we can't query whether debug information is enabled (as there is no corresponding predefined version for this), which would be useful as it would not be useful to print stack traces without debug information. For now, at least allow controlling whether stack traces are printed or not by adding an optional parameter which allows overriding the default behavior (which remains driven by the "-debug" flag).
PreviousNext