On Mon, 02 Aug 2010 10:02:04 -0400, Don Higgins <[email protected]> wrote:
2. The second place solution by Glenn Herrmannsfeldt uses a single loop with LG followed by multiple SRLG, NGR, and AGR's, plus BXLE. For the above text this solution executed 630 instructions. There is no working storage required as all operations are done in the registers. This solution uses a totally different approach from the other 3 solutions, and might actually prove to be fastest on a real z196.
Anyone interested in the basis for Glenn's way cool algorithm might be interested in http://en.wikipedia.org/wiki/Hamming_weight. Lot of other stuff on the web about hamming and bit counting but, Wikipedia (as usual) is a good place to start. -- Cheers, Alex Kodat Sirius Software
