Nicely written article by the author... can't take anything away from Manor for that.
I thoroughly understand the intent of the article... it's a method for making necessary RBAR faster. The problem is, it's still RBAR and there are a whole lot of folks that don't understand when RBAR is actually necessary. For example, it is patently [font="Arial Black"]not[/font] necessary to use any form of RBAR to generate random numbers... it can easily be done in a much higher performance set based fashion. All you have to do is spend about the same amount of time on one of the web search engines as what it takes to read this article and you'll find many ways to accomplish the task of generating random numbers in a set based fashion.
In situations where RBAR actually is necessary, you'll find that the necessary WHILE loop is NOT a performance problem because it's simply a vehicle for controlling multiple set based operations.
To wit, instead of folks spending time writing articles on how to make RBAR faster, I'd like to see them write articles on how to avoid RBAR in the first place. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.