5 ms·
I think you've misread the question. Grandparent isn't asking why use cmp_once at all; they're asking, why not always force the single evaluation of x and y (i.
by loeg 9y ago
I think you've misread the question. Grandparent isn't asking why use cmp_once at all; they're asking, why not always force the single evaluation of x and y (i.e., always use cmp_once and let the compiler optimizer reduce the resulting expression)? A responsive answer is given in https://news.ycombinator.com/item?id=16720118 https://news.ycombinator.com/item?id=16720118 .