HomeFreeBSD

amd64: mostly depessimize copystr

Description

amd64: mostly depessimize copystr

  • remove a forward branch in the common case
  • replace xchg + lodsb/stosb loop with simple movs

A simple test on Intel(R) Core(TM) i7-4600U CPU @ 2.10GH copying
/foo/bar/baz in a loop goes from 295715863 ops/s to 465807408.

Further changes are pending.

Reviewed by: kib
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D17281

Details

Provenance
mjgAuthored on
Reviewer
kib
Differential Revision
D17281: amd64: mostly depessimize copystr
Parents
rS338967: amd64: clean up copyin/copyout
Branches
Unknown
Tags
Unknown