Re: bswap is slow on SPARC
Sad Clouds <[email protected]> Tue, 25 Nov 2025 07:52:23 +0000
| Newsgroups | gmane.os.netbsd.ports.sparc,gmane.os.netbsd.ports.sparc64 |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 24 Nov 2025 21:08:31 +0000 nia <[email protected]> wrote: > The applications for fast byte-swaps extend way beyond this too. > Most multimedia file formats aren't big-endian. You are right, it is a useful optimisation to have. I was just trying to understand why little-endian meta-data was used for encrypted swap. Some time ago I implemented custom hashing functions and simple xor symmetric encryption algorithms. And depending on the use case, I omitted byte swapping, in order to keep it small and efficient. For example, hash tables codes or disk block checksums that don't need to be shared across different architectures, storing those in host byte order is acceptable.