[Bug 135718] [patch] enhance qsort(3) to properly handle 32-bit aligned data on 64-bit systems

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Feb 6 22:32:27 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=135718

--- Comment #5 from Andrey A. Chernov <ache at FreeBSD.org> ---
And the bug: on amd64 the patch always copy by 32bits instead of 64bits 
due to replacement of swapcode(long, a, b, n) by swapcode(int, a, b, n).
It is possible that copy by 32bits is faster on amd64 (I don't check), but it
is very architecture dependent and must be ifdefed.
If we going to be architecture dependent and optimize just i386 and amd64
cases, the code should use int32_t and int64_t and use proper
architecture-related ifdefs.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list