??? 08/19/05 14:54 Read: times |
#99703 - A worthy winner Responding to: ???'s previous message |
Jan Waclawek's solution is a worthy winner with some very good ideas. Several entrants picked up on the idea of using the MUL instruction to do multiple shifts in one go. Jan's solution minimised the processing required by noting that large shifts that can be handled with byte manipulation make it unnecessary to process all the remaining bits. Nice.
My own solution has been on the web for some time, it was just a variant of a solution I worked on for rolling a 32-bit number. The whole set can be found here: http://www.programmersheaven.com/zone5/cat.../31937.htm Maybe one day I'll get round to incorporating some of Jan's ideas for the shift functions. Efficient rolls and shifts are potentially commercially important. They crop up when bits need to be manipulated to access fields within a word and in algorithms such as MD5 (this being the problem that stimulated my interest). 24-bit shifts occur when doing floating point arithmetic. I have sometimes taken an interest in what compiler library code actually does and all the shifting and rolling I have seen uses the prosaic iterative method. Compiler writers please take note. I can see why some entrants gave more than one solution, but this is apt to cause confusion in what is, after all, a competition. It was not really a problem this time round, but could be in the future. Should the rules specify that only one solution should be offered? |
Topic | Author | Date |
First challenge done, new challenge up | 01/01/70 00:00 | |
Seems about right to me... | 01/01/70 00:00 | |
2 weeks? | 01/01/70 00:00 | |
re:challenge | 01/01/70 00:00 | |
"move the data intelligently" | 01/01/70 00:00 | |
re: | 01/01/70 00:00 | |
Overlapping data is part of the challeng | 01/01/70 00:00 | |
Yep! | 01/01/70 00:00 | |
Should work | 01/01/70 00:00 | |
And the Winner is... | 01/01/70 00:00 | |
A worthy winner | 01/01/70 00:00 | |
Yes | 01/01/70 00:00 | |
one + one | 01/01/70 00:00 | |
Note taken | 01/01/70 00:00 | |
tradeoff | 01/01/70 00:00 | |
exec time and size | 01/01/70 00:00 | |
exec time and size II | 01/01/70 00:00 | |
Public domain.... | 01/01/70 00:00 | |
Open source? | 01/01/70 00:00 |