News for hackers. Stuff that matters.
Re:GodBolt: Enter C, get Assembly by jdcarter on Thursday December 15, 2016 @12:36PM (#13186379)
I took that and check out what Clang does with 32-bit ints:

https://godbolt.org/g/ORsX5h

vs. what it does with 64-bit ints:

https://godbolt.org/g/2wBzn3

Can anybody explain the 32 bit version?

Re:GodBolt: Enter C, get Assembly by CorvusCrypto on Thursday December 15, 2016 @05:59PM (#13189478)
It's just vectorizing calculations so that it's faster than pure iterative calculation. 64 bit version doesn't get this probably because that optimizer isn't SSE2 aware yet (just a guess I actually don't know) and can't do SIMD arithmetic with 2 64 bit floats
Re:GodBolt: Enter C, get Assembly by user2994cb on Thursday December 15, 2016 @05:35PM (#13189263)
Harder to vectorize 64-bit arithmetic?
Re:GodBolt: Enter C, get Assembly by CorvusCrypto on Thursday December 15, 2016 @05:52PM (#13189406)
was going to say this. It probably only does SSE and not SSE2. Therefore vectorization only happens for 32 bit ints.
Re:GodBolt: Enter C, get Assembly by user2994cb on Friday December 16, 2016 @03:00AM (#13191789)
Seems to need -mavx2 to really go to town with 64 bit: https://godbolt.org/g/6EFYeY
Re:GodBolt: Enter C, get Assembly by jdcarter on Friday December 16, 2016 @03:31PM (#13196497)
Thank you both, I appreciate the insight!