Print

Print


> I once proposed (unoficially and orally) such an intrinsic,
> and Phillip has basically sumarized the reply I got.  It was
> obvious that this had been discussed before.  I didn't pursue
> it further (with questions like "well how about the easy cases;
> that would still be useful".  Such questions occurred to me, but
> it didn't seem worth arguing further at the time).

For the easy cases, it's literally just a very few lines of code.  Also,
I doubt the extra efficiency of an intrinsic, if any, would be necessary
in such a case---I doubt there are many problems computationally limited
by case conversion!  Thus, the real demand is probably actually quite
low and there are more important things to do.

In NUMERICAL RECIPES, there is a list of auxiliary routines or whatever,
things like SWAP which everyone has written which the authors found they
needed much more than many intrinsics.  In some of these cases, mainly
since a) there is more than one way to do it and b) the gain in
efficiency might be worth it, I think there is a much better case for
new intrinsics.