hzfan opened a new pull request, #11986:
URL: https://github.com/apache/tvm/pull/11986
The time complexity of the previous let printing algorithm is O(n^2), where
n is the number of let statments. This PR reduces it to O(n).
```
doc = doc_stack_.back() << doc;
```
The time complexity of this statement is determined by the length of doc.
For the ith iteration, a new let instruction is prepended to doc, so the length
of doc is O(i). They lead to the loop complexity 0+1+2...+n = O(n^2).
cc @comaniac @icemelon @yzhliu
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]