Re: Memory (compare and set) by 8 (cont from prev)

Oliver Xymoron (oxymoron@waste.org)
Mon, 17 May 1999 20:56:42 -0500 (CDT)


On Sun, 16 May 1999, Aaron Tiensivu wrote:

> On Sat, May 15, 1999 at 11:12:20PM -0400, Alex K. wrote:
> > OK, I'm assuming that if you're reading this, you read my message on
> > memcpy by 8 bytes. Why not also implement memcmp and memset using MMX
> > instructions to work by 8 bytes each? It would work just like the mempcy
> > idea, just with a different instruction inside the loop (PCMPEQD for
> > example, could be used for memcmp)
>
> I think this was explored in the past but the cost of switching in and out
> of MMX mode made the gain from it next to 0% or so.

I was under the impression that much of this cost was mitigated on newer
chips such as the K6-2 and PIII? I believe that Ingo had worked out a
piece of code for MMX checksumming fairly recently that did a runtime test
to determine which code to use..

--
 "Love the dolphins," she advised him. "Write by W.A.S.T.E.." 

- 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/