Skip to content

回复:0.3 即将就绪 ​

原始发布页

打开来源页面
查看 1 个交叉存档

谢谢 virtualcoin,这是一次完美的对比。

从 32 位 Windows(2310k)到 32 位 Linux(2500k)的 8% 提速,很可能源于 Linux 上使用了更新版本的 GCC(4.4.3 对比 3.4.5)。

从 32 位 Linux 到 64 位 Linux 的 15% 提速则更令人费解。代码完全是 32 位的。

嗯,我想应该是 x86-64 增加的 8 个额外寄存器发挥了作用。如果它能把 16 个状态变量中的大部分保存在寄存器里,这会给 SHA 带来显著差异。

英文原文 ​

展开英文原文

Thanks virtualcoin, that's a perfect comparison.

The 8% speedup from 32-bit Windows (2310k) to 32-bit Linux (2500k) is probably from the newer version of GCC on Linux (4.4.3 vs 3.4.5).

The 15% speedup from 32-bit to 64-bit Linux is more of a mystery. The code is completely 32-bit.

Hmm, I think the 8 extra registers added by x86-64 must be what's helping. That would make a significant difference to SHA if it could hold most of the 16 state variables in registers.

为历史保存,为中文读者整理。每篇档案均附来源与英文原文。