Vas Speaks in Tongues

Code, algorithms, languages, construction...
ernest
Posts: 247
Joined: Thu Sep 02, 2010 10:33 am

Re: Vas Speaks in Tongues

Post by ernest » Sat Jan 28, 2012 2:07 pm

MoldyJacket wrote:What hardware are you running these tests on?
Dualcore Intel E6600 @3GHz
(note that the old Rybkas only used 1 core)

ernest
Posts: 247
Joined: Thu Sep 02, 2010 10:33 am

Re: Vas Speaks in Tongues

Post by ernest » Sat Jan 28, 2012 2:42 pm

hyatt wrote:What is "ivory tower knowledge"?
You seem to know very little about Rybka. Your students either don't communicate with you, or are mostly interested in getting their degree (whatever...) rather than in actual computer chess.
What were the circumstances? Nothing running for both? Are you running the 32 bit code on the same box as the 64 bit code? There are issues doing so, compatibility libraries, wrapper library functions, etc...
Anybody can run the same test
(start_position, infinite analysis or time to depth n, on 1 core, for reproducibility).
Why don't you ask one of your students to do it?

I use the available compiled versions, say ProgramA_64bit.exe and ProgramA_32bit.exe
My computer has dual boot: Windows XP Pro x64 (64-bit) and Windows XP Home (32-bit)

In the 64-bit OS, I can run both ProgramA_64bit.exe and ProgramA_32bit.exe , and get a speed ratio.

In the 32-bit OS, I can run only ProgramA_32bit.exe, as a check, and the result will not be very different from what I got in the 64-bit OS, so I get a speed ratio, which shouldn't be very different from the previous calculated speed ratio.

Instead of working with the start_position, you can work with some middle game positions, the speed ratio will not be very different. Only with some endgame positions can the speed ratio be different

hyatt
Posts: 1242
Joined: Thu Jun 10, 2010 2:13 am
Real Name: Bob Hyatt (Robert M. Hyatt)
Location: University of Alabama at Birmingham
Contact:

Re: Vas Speaks in Tongues

Post by hyatt » Sat Jan 28, 2012 7:05 pm

We don't teach "computer chess" here. Students are not involved in "computer chess". I don't know of any that own a commercial chess engine, based on comments, excepting for chessmaster...

I simply see no valid explanation for such a performance gain, when no other program is getting anywhere near that. Unless there is something wrong in the 32 bit code that makes it slower than it should be, for reasons unknown.

ernest
Posts: 247
Joined: Thu Sep 02, 2010 10:33 am

Re: Vas Speaks in Tongues

Post by ernest » Sun Jan 29, 2012 4:41 pm

hyatt wrote:We don't teach "computer chess" here. Students are not involved in "computer chess". .
OK... I thought that "some" of your students were involved in crafty-related research, and computer chess
I simply see no valid explanation for such a performance gain,
Vas put his effort in his 64-bit optimized code, and declared that no particular effort was made for the 32-bit exe.
Whether he could "easily" have made an effort for a faster 32-bit exe I don't know (original source code?, compiler?).

On the other hand, Marco Costalba said that for Stockfish they did try to optimize their 32-bit exe (and the speed ratio is around x1.3)

hyatt
Posts: 1242
Joined: Thu Jun 10, 2010 2:13 am
Real Name: Bob Hyatt (Robert M. Hyatt)
Location: University of Alabama at Birmingham
Contact:

Re: Vas Speaks in Tongues

Post by hyatt » Mon Jan 30, 2012 12:23 am

I simply wrote for 64 bits from the beginning, and my speed gain was maybe 1.3x as well...

BB+
Posts: 1484
Joined: Thu Jun 10, 2010 4:26 am

Re: Vas Speaks in Tongues

Post by BB+ » Tue Jan 31, 2012 5:00 am

OK, but then let's be fair: for some reason, Vasik never cared to do a good job with the 32-bit versions.
My comparison was for purposes in the commercial market. I think the most "fair" datapoint to take is thus that which corresponds to the most profitable platform at the time (and maybe still, though mobile apps may have caught up), namely 32-bit 1-cpu. Of course, most hardcore users (including almost anyone who posts on a forum) are not likely to have this as their hardware of choice. And I can guess that (similar to auto racing) while most people buy the 32-bit 1-cpu version, many often do so based upon who managed to win some championship with some fancy hardware/book.

I have my ideas on why there is such a large(r) 32/64-bit gap for Rybka, but I'd rather not say too much about this right now.

MoldyJacket
Posts: 77
Joined: Sun Mar 20, 2011 1:11 am
Location: Charlotte, NC
Contact:

Re: Vas Speaks in Tongues

Post by MoldyJacket » Tue Jan 31, 2012 9:40 pm

The old NASCAR cliché: What wins on Sunday, sells on Monday. I’m fascinated and look forward to hearing more about the gap sometime in the future.
Nominal Quoting Fanboy

MoldyJacket
Posts: 77
Joined: Sun Mar 20, 2011 1:11 am
Location: Charlotte, NC
Contact:

Re: Vas Speaks in Tongues

Post by MoldyJacket » Wed Feb 08, 2012 5:55 am

The infamous “0.0”, “0.” or “.0” (depending on how one wants to present it) issue keeps popping up. If I’m not mistaken, any decent complier will issue a warning complaining of the type mismatch comparison. I find it very hard to believe someone developing their own code would ever let a warning like this slide; it is usually developed in incremental steps that are fully corrected before proceeding further. This type of error seems far more probable when rushing to meet a deadline with cobbled code that is not fully understood…as long as it complies and produces desired results, all those warnings be damned.





I’m not trying to be cute, but I do recognize a bicentennial birthday today with this renowned opening paragraph:
IT WAS the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of Light, it was the season of Darkness, it was the spring of hope, it was the winter of despair, we had everything before us, we had nothing before us, we were all going direct to Heaven, we were all going direct the other way- in short, the period was so far like the present period, that some of its noisiest authorities insisted on its being received, for good or for evil, in the superlative degree of comparison only.
Nominal Quoting Fanboy

hyatt
Posts: 1242
Joined: Thu Jun 10, 2010 2:13 am
Real Name: Bob Hyatt (Robert M. Hyatt)
Location: University of Alabama at Birmingham
Contact:

Re: Vas Speaks in Tongues

Post by hyatt » Thu Feb 09, 2012 3:04 am

MoldyJacket wrote:The infamous “0.0”, “0.” or “.0” (depending on how one wants to present it) issue keeps popping up. If I’m not mistaken, any decent complier will issue a warning complaining of the type mismatch comparison. I find it very hard to believe someone developing their own code would ever let a warning like this slide; it is usually developed in incremental steps that are fully corrected before proceeding further. This type of error seems far more probable when rushing to meet a deadline with cobbled code that is not fully understood…as long as it complies and produces desired results, all those warnings be damned.





I’m not trying to be cute, but I do recognize a bicentennial birthday today with this renowned opening paragraph:
IT WAS the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of Light, it was the season of Darkness, it was the spring of hope, it was the winter of despair, we had everything before us, we had nothing before us, we were all going direct to Heaven, we were all going direct the other way- in short, the period was so far like the present period, that some of its noisiest authorities insisted on its being received, for good or for evil, in the superlative degree of comparison only.
Compilers don't issue warnings here, because comparing ints and floats is a part of the C standard, which dictates that the int must be promoted (converted, FILD instruction in asm) to a float before the operation is done...

Simple test code:

int f(int v) {
if (v >= 0.0) return 0;
else return 1;
}

compiling with intel compiler:

scrappy% icc -c tst.c
scrappy%

With gcc:
scrappy% gcc -c tst.c
scrappy%

Even with -Wall (all warnings enabled):

scrappy% gcc -Wall -c tst.c
scrappy%

MoldyJacket
Posts: 77
Joined: Sun Mar 20, 2011 1:11 am
Location: Charlotte, NC
Contact:

Re: Vas Speaks in Tongues

Post by MoldyJacket » Thu Feb 09, 2012 6:10 am

OK, thanks for clearing that up for me. I knew it would do an automatic conversion, but I sure thought a good complier these days would assist by warning to insure that is truly the intent. Explains how it got by and how damn careful the C programmer has to be (with great power comes great responsibility :) ).
Nominal Quoting Fanboy

Post Reply