Messages in this thread | | | Date | Fri, 21 May 1999 09:48:53 +0200 | From | Artur Skawina <> | Subject | Re: Kernel checksum routime (>=5)x86 optimization |
| |
Kurt Garloff wrote: > > By the way: Is it correct to use adcl in this piece of code???
yes
> Why do we want to add 1 instead of 1<<32 in case of overflow???
one's complement arithmetic (see rfc1071 for details on the checksum)
> > For instructions this simple the integer units are probably faster than > > the instruction decoder anyway. > > That might be the reason, yes. > it might also be that only one load can be executed per cycle.
ppro+ breaks up instructions into something intel calls 'microops'. There are three decoders, the first can do four microops per cycle, the other two only one/cycle. so you can have up to three instructions per cycle, but only one can be complex and the others must be simple. For example that routine with "%adcl XX(%esi), %eax" replaced with "addl XX(%esi), %eax ; setc %ch; addb %ch, %bl" only does two percent worse. With "addl XX(%esi), %eax ; adcl $0, %ebx" it does 10% worse.
artur
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |