YaK:: Duff's Device [Changes]   [Calendar]   [Search]   [Index]   [PhotoTags]   
[mega_changes]
[photos]

Duff's Device


        send(to, from, count)
        register short *to, *from;
        register count;
        {
                register n=(count+7)/8;
                switch(count%8){
                case 0: do{     *to = *from++;
                case 7:         *to = *from++;
                case 6:         *to = *from++;
                case 5:         *to = *from++;
                case 4:         *to = *from++;
                case 3:         *to = *from++;
                case 2:         *to = *from++;
                case 1:         *to = *from++;
                        }while(--n>0);
                }
        }

  • http://groups-beta.google.com/group/net.lang.c/msg/66008138e07aa94c
  • http://www.google.com/search?q=tom+duff%27s+device

  • (unless otherwise marked) Copyright 2002-2014 YakPeople. All rights reserved.
    (last modified 2005-03-31)       [Login]
    (No back references.)