By: Charlie Burnes (charlie.burnes.delete@this.no-spam.com), May 22, 2022 1:53 pm
Room: Moderated Discussions
Thank you for your interesting comments.
> Apart from the C/C++ preference, one distinction to Highway is that I always use the unaligned IO instructions.
> I cannot measure a performance difference between aligned and unaligned IO _instructions_.
> There is a performance difference between aligned and unaligned _data_. So really the
> decision is whether you prefer runtime faults for unaligned data or lower performance.
I don’t follow your reasoning here. If there is a performance difference between aligned and unaligned data, why not just use aligned data to avoid lower performance? What do you mean by “the decision is whether you prefer runtime faults for unaligned data or lower performance”? If the data is aligned, I would think you would not get either runtime faults for unaligned data or lower performance. I also don’t know how it would be possible to always have aligned instructions given the variable length nature of the x86 instruction set. Sorry if this is a dumb question.
> Apart from the C/C++ preference, one distinction to Highway is that I always use the unaligned IO instructions.
> I cannot measure a performance difference between aligned and unaligned IO _instructions_.
> There is a performance difference between aligned and unaligned _data_. So really the
> decision is whether you prefer runtime faults for unaligned data or lower performance.
I don’t follow your reasoning here. If there is a performance difference between aligned and unaligned data, why not just use aligned data to avoid lower performance? What do you mean by “the decision is whether you prefer runtime faults for unaligned data or lower performance”? If the data is aligned, I would think you would not get either runtime faults for unaligned data or lower performance. I also don’t know how it would be possible to always have aligned instructions given the variable length nature of the x86 instruction set. Sorry if this is a dumb question.