typescript-formatter icon indicating copy to clipboard operation
typescript-formatter copied to clipboard

format()の時間計算量を改善

Open ikeyan opened this issue 5 years ago • 1 comments
trafficstars

format()関数のeditsを適用する計算量が、およそO(ソース文字列.length × edits.length)になっていたので、O(ソース文字列.length + edits.length * log(edits.length)) になるように変更しました。

ikeyan avatar Sep 12 '20 04:09 ikeyan

Translation: Title:

Improved time complexity of format()

Message:

The computational complexity of applying the format() function's edits was
O(source string.length × edits.length),
changed to O(source string.length + edits.length * log(edits.length) )

EduApps-CDG avatar Oct 18 '22 16:10 EduApps-CDG