看板 NetSecurity 關於我們 聯絡資訊
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 我知道我最笨啦 wrote: > 迴圈展開跟迴圈合併的解釋,手頭上有的書籍翻遍還是無解只好來這問看看有 > 高手能為我解答..感激不盡.. 是在講 optimize 嗎? 加密演算法有時會有 16 rounds 之類的 程式可能寫成 for (i=0 ; i<16 ; i++) { a[i]=... } 這時為了加速 (省掉 < 跟 ++) 就會把程式改成 a[0]=... a[1]=... .... a[15]=... 合併可能是 for(i=0; i<16; i++) a[i]=... for(i=0; i<16; i++) b[i]=... 那合併就變成 for(i=0; i<16; i++) { a[i]=...; b[i]=...} 少做16次<跟++ - -- PaulLiu(劉穎駿) E-mail address:PaulLiu.bbs@bbs.cis.nctu.edu.tw -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with Debian - http://enigmail.mozdev.org iD8DBQFDkIGHoQj7xTSiaUYRAoYOAJ9h8TuNCDqmEvf1XcEOm2J1+PycaQCeLOju wxs/BruU0Bdd+JvG74XmDOo= =Zalx -----END PGP SIGNATURE-----