Search found 16741 matches

by bob
Fri Mar 02, 2018 1:46 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Reliable speed comparison: some math required
Replies: 33
Views: 8611

Re: Reliable speed comparison: some math required

... If you want to go as far as I did, run a lightweight kernel. No virtual memory or anything there, rock-solid repeatability. I have googled it, but it appears you can not disable virtual memory in Linux. What kernel did you run? What test metrics do you use for testing? Lightweight kernel versio...
by bob
Fri Mar 02, 2018 1:45 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Reliable speed comparison: some math required
Replies: 33
Views: 8611

Re: Reliable speed comparison: some math required

Jouni wrote:I think the problem is not math, but too many things to consider: linux/windows, AMD/Intel, popcount, bmi, 64 bit single/multi etc!?
Certainly isn't math. It takes a little thought and preparation to get good benchmarking results...
by bob
Wed Feb 28, 2018 2:26 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Reliable speed comparison: some math required
Replies: 33
Views: 8611

Re: Reliable speed comparison: some math required

Testing in parallel is only more noisy Did you verify this hypothesis of yours with empirical data ? I suggest you try… It has been verified MANY times in the past. Even worse, testing in parallel can result in some CPUS throttling back due to heat or power consumption, which adds MORE noise. The c...
by bob
Fri Feb 23, 2018 4:22 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: I'm not very happy with the do {} while() statement in C
Replies: 111
Views: 25229

Re: I'm not very happy with the do {} while() statement in C

I would prefer 'for(EVER)' or 'while(UNBROKEN)'. :lol: Here you go: #define EVER ;; ... for(EVER) { do_stuff(); } That is not so bad. I am beginning to think that my original approach while(1) {} might have been about the best that can be done, although it does require knowled...
by bob
Fri Feb 23, 2018 4:12 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: I'm not very happy with the do {} while() statement in C
Replies: 111
Views: 25229

Re: I'm not very happy with the do {} while() statement in C

one_more_time: ... if (finished) goto done; ... goto one_more_time; done: ... I've used that millions of times in years gone by. Particularly in asm type code. But it is not so intuitive when spread over a page or more. It doesn't jump out and say "this is a loop"...
by bob
Thu Feb 22, 2018 2:21 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: I'm not very happy with the do {} while() statement in C
Replies: 111
Views: 25229

Re: I'm not very happy with the do {} while() statement in C

If you don't like 'break', it is easily avoidable at the price of some extra indentation: do { int success = read_some_input(); if(success) { process_input(); } } while(success); 'while(FOREVER)' sounds linguistically broken. I would prefer 'for(EVER)' or...
by bob
Tue Feb 20, 2018 10:23 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: I'm not very happy with the do {} while() statement in C
Replies: 111
Views: 25229

Re: I'm not very happy with the do {} while() statement in C

Okay Bob, Assuming that you still do not like the final draft of my initializing function then the appropriate saying would be, "put up or shut up". So how would you write it? And if you write it and I like it I will use it and give you full credit in the readme file. I'm the student and you are th...
by bob
Tue Feb 20, 2018 5:51 am
Forum: Computer Chess Club: General Topics
Topic: question about non determinism of chess programs
Replies: 5
Views: 1411

Re: question about non determinism of chess programs

stockfish played in TCEC in the first move 3 different moves: 1.e4 1.d4 1.Nf3 Now the question is the following: If you play engine A against engine B for n plies with no book(A is white) and repeat it for N games how many different games you can expect to have of course it is a function of A B and...
by bob
Tue Feb 20, 2018 5:22 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: I'm not very happy with the do {} while() statement in C
Replies: 111
Views: 25229

Re: I'm not very happy with the do {} while() statement in C

Goto is a perfectly fine tool - and like any tool, it can be misused. The goto aversion stems from a Dijkstra article in the 1960s, but that referred to the goto in Basic. That was another beast because it was using fixed line numbers as jump targets, which quickly could become a maintenance nightm...
by bob
Tue Feb 20, 2018 5:13 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: I'm not very happy with the do {} while() statement in C
Replies: 111
Views: 25229

Re: I'm not very happy with the do {} while() statement in C

In the do while loop I have to execute instructions that at some point will not need to be executed. It is not really a problem in this simple initiation example. But still it seems like a poor design. It would be perfect if the do while worked like this. k = i + dir[j]; if (initBoard[k]) {...