SSE4 instructions

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

User avatar
rvida
Posts: 481
Joined: Thu Apr 16, 2009 12:00 pm
Location: Slovakia, EU

Re: SSE4 instructions

Post by rvida »

Don wrote:
MM wrote:Hi all,

how many more knodes and how many elo points or how much more speed can sse4 instructions give an engine?

I don't know anything about programming and i wonder if there's a substantial difference in performance.

Thank you

Best Regards
Komodo seems to benefit more than other programs so your mileage may vary, but it's probably not a huge deal.
Komodo this, Komodo that, it would benefit from anything that a modern CPU freak touches... It's slow like hell, and I'm pretty sure I could improve it (especially the 32bit version) to be 25-35%faster...
With some algo+SW optimization love it is quite possible that Kmodo4 would be already #1
diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: SSE4 instructions

Post by diep »

rvida wrote:
Don wrote:
MM wrote:Hi all,

how many more knodes and how many elo points or how much more speed can sse4 instructions give an engine?

I don't know anything about programming and i wonder if there's a substantial difference in performance.

Thank you

Best Regards
Komodo seems to benefit more than other programs so your mileage may vary, but it's probably not a huge deal.
Komodo this, Komodo that, it would benefit from anything that a modern CPU freak touches... It's slow like hell, and I'm pretty sure I could improve it (especially the 32bit version) to be 25-35%faster...
With some algo+SW optimization love it is quite possible that Kmodo4 would be already #1
Open letter to get job to hack in Don's code you must write to organisation, not to Don :)

p.s. to join the open public bidding: add some chessknowledge is +200 elopoints handsdown, so your 25 elobid is beginnerpeanuts. I can raise bid to 250 if you go bid more as well :)

Just 75 euro an hour my rate btw. Maybe you can underbid THERE ;)
Engin
Posts: 918
Joined: Mon Jan 05, 2009 7:40 pm
Location: Germany
Full name: Engin Üstün

Re: SSE4 instructions

Post by Engin »

hi Richard,
i would be more happy if you can improve my Tornado too, you know what about i am talking :)
rbarreira
Posts: 900
Joined: Tue Apr 27, 2010 3:48 pm

Re: SSE4 instructions

Post by rbarreira »

bob wrote:
rvida wrote:
bob wrote:
rbarreira wrote: Why? I'm pretty sure that doing "hw_popcount (low_32_bits) + hw_popcount (high_32_bits)" is faster than other methods of doing 64-bit popcnt on a 32-bit architecture.
I am not sure why one would do a pair of 32 bit operations on a machine that is obviously 64 bits (those are the only processors with hardware popcnt)...
He meant 64bit SSE4.2 capable processor running a 32bit OS (+32bit engine obviously). In such scenario it makes sense to use hw popcnt even in 32bit mode.
Even worse, as now you lose ALL the advantages the 64 bit cpu brings. Extra 8 registers for starters...

I'm still amazed that anyone considers doing this (32 bit O/S on a very recent 64 bit cpu...)
Believe it or not, some computers (particularly laptops) still come pre-installed with 32-bit windows. Even the Ubuntu website still lists the 32-bit version as "recommended". If you're surprised by this it's probably because you have only been looking at PCs belonging to tech-savvy people.

All I was saying was that two 32-bit hardware popcnt instructions is the best way I know of doing a 64-bit popcnt on a 32-bit environment that has the popcnt instruction.