tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[Relay] optimize dumpir time

Open Yangzijun510 opened this issue 3 years ago • 2 comments
trafficstars

Add string before doc, slow. Add string after doc, fast

Thanks for contributing to TVM! Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers by @ them in the pull request thread.

Yangzijun510 avatar Sep 15 '22 13:09 Yangzijun510

I tested that
Doc doc; for (int i = 0; i <= 100000; i++) { Doc a; a << "a"; doc = a << doc; }; and Doc docc; for (int i = 0; i <= 100000; i++) { Doc a; a << "a"; docc = docc << a; } First cost time is 150s Second cost time is 1s

Yangzijun510 avatar Sep 15 '22 13:09 Yangzijun510

@Hzfengsy cc

Destinywck avatar Sep 16 '22 02:09 Destinywck