[RESEND PATCH v2 1/5] lib/sort: Make swap functions more generic

2019-03-19 Thread George Spelvin
Rather than having special-case swap functions for 4- and 8-byte objects, special-case aligned multiples of 4 or 8 bytes. This speeds up most users of sort() by avoiding fallback to the byte copy loop. Despite what commit ca96ab859ab4 ("lib/sort: Add 64 bit swap function") claims, very few users

[PATCH v2 1/5] lib/sort: Make swap functions more generic

2019-03-15 Thread George Spelvin
Rather than having special-case swap functions for 4- and 8-byte objects, special-case aligned multiples of 4 or 8 bytes. This speeds up most users of sort() by avoiding fallback to the byte copy loop. Despite what commit ca96ab859ab4 ("lib/sort: Add 64 bit swap function") claims, very few users