Deprecating Lukhnos Liu's DAG walker, using Dijkstra instead. #115
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Lukhnos 在 Gramambular 2 引入的 DAG-Relax(有向無環圖)組句算法在 Sandy Bridge CPU 電腦上的效能不如這個 PR 引入的經過最佳化處理的 Dijkstra 組句算法。
另外,哪怕是末代的 Intel mac mini(Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz),測試得出的結論也是一樣。
平均記憶體佔用雖是 DAG 的兩倍,但峰值記憶體佔用略低、在 i7-8700B 測試下述內容時僅需要 23s(DAG 需要 32s)。
因為 Dijkstra 算法不涉及到 Retain Cycle,所以 Swift ARC 可以自動完成記憶體清掃工作、不需要手動 ASAN。