Re: [PATCH] Speed up "copy4", "copy64" on little-endian systems.

Joel Rosdahl <[email protected]>
Newsgroups gmane.comp.compilers.ccache
Message-ID <CAK8D=pg9mnWSgVTz1tfTKvnMX43ZczvuXXUTc_Qw50G9oV=R_g@mail.gmail.com>
On 21 November 2012 18:46, Andrew Stubbs <[email protected]> wrote:
> The copy64 function implements an endian-safe copy routine for
> an array of 16 32-bit integers, but this is sub-optimal on machines
> where the byte-order is already correct. Likewise for copy4.
>
> This patch replaces the implementation with a simple memcpy when
> appropriate, and retains the old implementation otherwise.
>
> Note that the compiler will always inline calls to memcpy for small
> byte-counts, so this is a big win.

Applied, thanks!

By the way, the patch is missing some headers, so "git am" doesn't
understand it. I suggest using "git format-patch" instead of "git
diff" for generating future patches.

-- Joel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.