(also posted as a comment to a blog entry re tsx-tools by Andy)
I've just started playing around with the new TSX feature set.
I wrote a quick test with a loop over lock;xchgl and movl with and without HLE prefixes.
To my surprise, the version with HLE prefixes seems to be ~50% slower?
Is the test invalid/irrelevant for some reason?
Am I doing something wrong or is this expected?
The test was run on a MacBook Air with an i7-4650U 1.7 GHz (Haswell) CPU
Rolfs-MacBook-Air:tsx-tools ran$ ./has-tsx
The code enclosed below was compiled with:
Rolfs-MacBook-Air:ran ran$ clang -O4 -o tt tt.c -lc
Rolfs-MacBook-Air:ran ran$ time ./tt 1 100000000
Rolfs-MacBook-Air:ran ran$ time ./tt 2 100000000
Source code for tt.c is attached.