作者A1pha ([αλφα])
看板Visual_Basic
標題[VB6 ] double的效率比single高?
時間Tue Aug 10 11:36:17 2010
我一直以來好像誤會了@@"
我一直以為說,
資料型態所使用的位元組最多,效率越差...
但是我剛剛在網路上看到一分講義,
上面卻是寫說Double的執行效率是所有分數(更該是指以小數點的)
裡面最高的。
他是說因為目前平台上的處理器是以雙精度浮點數來執行浮點運算。
真的是這樣呀?@@
用single反而執行效率比較差這樣嗎?@@
--
"Every kid who has dreamed of being a baseball player has stood in his front
yard with a bat and said to himself, "Bottom of the ninth, Game 7 of the
World Series, the bases are loaded," and then envisioned hitting a home run
to win the game. My job is to shatter that dream."
By Huston Street
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 210.202.55.129
推 fumizuki:我記得我自己測試過的結果是single double 差不多 08/10 12:48
→ fumizuki:浮點數比整數效率高 08/10 12:49
→ A1pha:是喔@@ 那份講義是說整數效率最好QQ 08/10 14:33
→ A1pha:不知道是不是我哪裡看錯還是誤會了...囧 08/10 14:35
推 SmallBeeWayn:指令長度一樣,速度應該差不多 08/11 04:35