![]() | |||||||||||
Messages in this thread |
> > In the Intel Architecture Optimization document it specifically states > (Chapter 2.6) : > "Avoid instructions that unnecessarily introduce dependence-related > stalls: inc and dec instructions, .....". > And again on page 2-11 : > "The inc and dec instructions should always be avoided. Using add and > sub instructions instead avoids data dependence and improves performance". > And on page 2-71 : > "The inc and dec instructions modify only a subset of flags in the flag > register. > This creates a dependence on all previous writes of the flag register. > This is especially problematic when these instructions are on the critical > path because they are used to change an address for a load on which > many other instructions depend. " Well it sounds dramatic but in reality I doubt it is such a big deal. Anyone to bench it? > However, the kernel include and arch have a liberal sprinkling of inc/dec, > and AFAICT some of these in hot-path. -- vda - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | ||||||||||
| Last update: 2005-09-14 09:57 [from the cache] ©2003-2008 | |||||||||||