News for hackers. Stuff that matters.
Re:X86 is a high-level language by riscy on Wednesday March 25, 2015 @03:53PM (#9265471)
Something interesting to note is that at least in the Pentium 4, the number of cycles spent on integer division instructions varies depending on the values of the operands [1].

[1] https://gmplib.org/~tege/x86-timing.pdf (pages 4 & 6)

Re:X86 is a high-level language by pascal_cuoq on Wednesday March 25, 2015 @04:16PM (#9265624)
This same property was also advertised as an improvement in a new generation of Intel processors a few years ago. I am pretty sure it was Haswell.
Re:X86 is a high-level language by maleadt on Friday March 27, 2015 @08:20AM (#9275799)
A colleague of mine mentioned how this has been the case for quite a bit longer than Haswell, see "Compiler mitigations for time attacks on modern x86 processors" (from 2012). Or Agner Fog's timings pages, where many DIV instructions list widely ranging latencies, with the comment "[l]ow values are for small results, high values for high results".
Re:X86 is a high-level language by pascal_cuoq on Saturday March 28, 2015 @08:28AM (#9281295)
Thanks for the reference, that is much better than my vague recollections.

What I remembered having seen advertised (presented as an improvement, of course) is new early-exit paths for the easier arguments to division. The marketing brochure emphasised the novelty, so I must have wrongly inferred that division took constant time before that.

Considering paragraph 2.2 in http://users.elis.ugent.be/~brdsutte/research/publications/2... , I may have been remembering a new division algorithm in Nehalem. I will cite that article from now on.