[PATCH] D37517: [ELF] - Report orphan sections if -verbose given.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 13:13:59 PDT 2017


ruiu added a comment.

> I performed a quck test which tries to simulate the situation (https://ideone.com/p07NYi). It calls some method log() which do nothing with random string argument million of times.
>  Like if we would have script with million of orphans and verbose set to off. It takes 80 milliseconds in total. That probably can be considered as the approximation of worst possible scenario ?

Well, I do not believe that the cost of calling `log` really matters, but your test doesn't seem to test it correctly. We are talking about the cost of calling toString on `InputSectionBase *`. I don't think it makes much sense to write some different function and measure its performance on dummy inputs. Why don't you just profile it?


https://reviews.llvm.org/D37517





More information about the llvm-commits mailing list