中文字幕 另类精品,亚洲欧美一区二区蜜桃,日本在线精品视频免费,孩交精品乱子片免费

<sup id="3hn2b"></sup>

    1. <sub id="3hn2b"><ol id="3hn2b"></ol></sub><legend id="3hn2b"></legend>

      1. <xmp id="3hn2b"></xmp>

      2. 新聞中心

        EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > Delphi:高效的哈希函數(shù)程序

        Delphi:高效的哈希函數(shù)程序

        作者: 時(shí)間:2012-09-13 來(lái)源:網(wǎng)絡(luò) 收藏


        //begin
        // Result := (Result * 131) + PByte(buf)^;
        // Inc(PByte(buf));
        // Dec(count);
        //end;
        end;
        function DJBHash(buf: Pointer; count: Integer) : Cardinal; assembler;
        asm
        PUSHEDI
        PUSHEBX
        XOR EBX, EBX
        MOV ECX, EAX
        MOV EAX, 5381
        @LOOP:
        TESTEDX, EDX
        JZ @EXIT
        MOV EDI, EAX
        SHL EDI, 5
        ADD EAX, EDI
        MOV BL, [ECX]
        ADD EAX, EBX
        INC ECX
        DEC EDX
        JMP @LOOP
        @EXIT:
        POP EBX
        POP EDI
        //----------------------------
        // Pascal:
        //
        //Result := 5381;
        //while count > 0 do
        //begin
        // Result := ((Result shl 5) + Result) + PByte(buf)^;
        // Inc(PByte(buf));
        // Dec(count);
        //end;
        end;

        本文引用地址:http://www.antipu.com.cn/article/170867.htm

        上一頁(yè) 1 2 下一頁(yè)

        關(guān)鍵詞: 程序 函數(shù) 哈希 高效 Delphi:

        評(píng)論


        相關(guān)推薦

        技術(shù)專區(qū)

        關(guān)閉