3 ms·
What does Duff's Device have do with the article?
by SamReidHughes 8y ago
What does Duff's Device have do with the article?
- harry8 8y agoLoop unrolling is obviously a form of inlining. Perhaps OP is considering the case. "No backwards branches. For a long loop no branch back is clearly silly. Is unrolling and inlining part of it worthwhile? How does it help or hider readability, unnecessary operation identification, (eg repeated intialisation) and bug identification? Does it have a tension with execution time? These answers would likely be different in 2019. SIMD intrinsics anyone because compilers can't do it well at all. Function with a descriptive name that is called or just write it all right there probably with a comment right where the function call would have been and right where it would have returned..? We're talking low level optimisation or he wouldn't be having the discussion in terms of c++ etc. Duff is frequent touchstone is such a discussion although not mandatory by any means. (He said trying to get a little of such discussion going ;-)
- SamReidHughes 8y agoThis article is not about low level optimization.
- harry8 8y agoTry to be more constructive. I think it is. I explained why I think so. You've not explained anything, just 2 really negative posts of little productive use to anyone. No need to even post that kind of thing, right? Contributes nothing to a discussion. Explaining your point of view, might.
- deleted 8y ago[deleted]
- ggm 8y agoWhat does loop unrolling have to do with inline code and not invoking the procedure call overhead? well apart from being the ground case, nothing I guess. I just expected that if you want to talk about procedure call inline, you also talk about other inline
- kyralis 8y agoNeither loop unrolling nor avoidance of call overhead have anything to do with this article, with the exception of a small segment actually arguing against manual loop unrolls/structure unpacking. The article is about code structure for clarity, defect reduction, and predictability.