Re: 請問兩個系統程式的解釋

看板NetSecurity (資安 資訊安全)作者時間20年前 (2005/12/03 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/4 (看更多)
-----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-----
文章代碼(AID): #13a8lr00 (NetSecurity)
文章代碼(AID): #13a8lr00 (NetSecurity)