amd64 slower than i386 on identical AMD 64 system? / How is hyperthreading handled on amd64?

Bruce Evans bde at zeta.org.au
Thu Mar 16 19:43:44 UTC 2006


On Thu, 16 Mar 2006, Coleman Kane wrote:

> IMO, I don't expect many of the normal day to day operations on my amd64
> machine to be significantly faster than if it were running an i386 kernel.

You should expect almost of of them to be slower.

> Due to the differences between the two (amd64 and ia32) architectures, it is
> quite likely that certain operations will be faster on one than on the other
> (and not broadly assume that amd64 will always at least be as well
> performing as ia32 mode).

There are considerable differences at the FreeBSD arch level but none
at lower levels since the CPU is identical with itself.  Everything
gets converted to a micro-op and the same instruction schedulers and
pipeline resources etc. apply to the micro-ops.  Higher levels generate
a different mixture of micro-ops, and the difference mostly favors
32-bit mode since 64-bit ops are wider.

> One good point is that, for instance, in ia32 mode you can fit twice as many
> possible 'values' in your cache than in amd64 mode. Also, types of long are
> the same length as pointers and "int"s in ia32, while only long and pointers
> are the same length in amd64. So you're amd64 vs. ia32 code in many cases
> can be longer and less cache-nice. These considerations need to be taken
> into account when analyzing performance benchmarks.

Yes, the wider ops generally take the same time unless they access
memory.  Then they mostly take the same time if they hit the L1 cache,
but they put a heavier load on the L1 cache and eventually cause more
accesses to real memory which is _slow_.

Bruce


More information about the freebsd-amd64 mailing list