News for hackers. Stuff that matters.
Re:Endianness, a constant source of conflict for decades by flohofwoe on Wednesday August 18, 2021 @04:51AM (#28218968)
> as it forces you to read things byte-by-byte

Indeed, reading file headers byte by byte also avoids alignment issues on some CPUs. At least older ARM CPUs trapped misaligned reads (not sure if this is still the case though).

Re:Endianness, a constant source of conflict for decades by walki on Wednesday August 18, 2021 @05:09AM (#28219049)
> not sure if this is still the case though

No this is not the case anymore. Nowadays support for unaligned memory accesses is very good on ARM and most other CPU architectures. On x86 aligned memory used to be very important for SIMD but now there are even special SIMD instructions for unaligned data and the performance overhead of unaligned memory accesses is generally very small in my experience.