Search found 14 matches

by Bo Persson
Sat Apr 02, 2011 1:03 pm
Forum: Programming and Technical Discussions
Topic: GCC -Ofast
Replies: 5
Views: 4470

Re: GCC -Ofast



-ffast-math
Sets ‘-fno-math-errno’, ‘-funsafe-math-optimizations’, ‘-ffinite-math-only’,
‘-fno-rounding-math’, ‘-fno-signaling-nans’ and ‘-fcx-limited-range’.
This option causes the preprocessor macro __FAST_MATH__ to be defined.



Those seems to be floating point options. Probably not useful ...
by Bo Persson
Sun Mar 06, 2011 2:25 pm
Forum: Programming and Technical Discussions
Topic: Bits and Pieces
Replies: 21
Views: 10982

Re: Bits and Pieces

one-input -> one-output is pretty clear and well-defined. The minute you reach one-input -> multiple possible outputs, you cross the line. But not before, IMHO. Note that this is a suggestion. NO one has adopted it as a rule or policy...
Is this correct, then?

1) If one-input-one-output function ...
by Bo Persson
Sat Mar 05, 2011 10:43 am
Forum: Programming and Technical Discussions
Topic: Bits and Pieces
Replies: 21
Views: 10982

Re: Bits and Pieces

one-input -> one-output is pretty clear and well-defined. The minute you reach one-input -> multiple possible outputs, you cross the line. But not before, IMHO. Note that this is a suggestion. NO one has adopted it as a rule or policy...
Is this correct, then?

1) If one-input-one-output function ...
by Bo Persson
Wed Mar 02, 2011 9:12 pm
Forum: Programming and Technical Discussions
Topic: Bits and Pieces
Replies: 21
Views: 10982

Re: Bits and Pieces

Ben, I will give you another version:


inline int MemberCount(long long Bits)
{
int Count = 0;

while (Bits != 0)
{
++Count;
Bits &= (Bits - 1);
}

return Count;
}
// COPYRIGHT 2011 Bo Persson

With VS2010 64-bit edition, this generates exactly the same instructions as the Crafty hand ...
by Bo Persson
Sun Feb 20, 2011 12:16 pm
Forum: Programming and Technical Discussions
Topic: recursive inclusion
Replies: 1
Views: 1642

Re: recursive inclusion

In Ivanhoe, file "low_depth.c", there is "#include "low_depth.c"". The file recursively includes itself. Why?

Is this just sloppy programming?

And, other Ivanhoe files do this.

I think they just outsmarted themselves. :-)

There is an include guard that makes the second inclusion different ...
by Bo Persson
Sun Feb 20, 2011 12:06 pm
Forum: General Topics
Topic: Change or Die
Replies: 8
Views: 2836

Re: Change or Die

Friedbert wrote:All I know: There is no copyright on chess games.
There has been a discussion some years ago about this issue.
I think GM Hübner was involved.
Right, the game score is considered a piece of fact, what actually happened. You can't copyright facts.
by Bo Persson
Tue Feb 01, 2011 6:24 pm
Forum: General Topics
Topic: How to compile from Source Codes and the Tools
Replies: 40
Views: 19069

Re: How to compile from Source Codes and the Tools


I recall I used some small program for my custom TSCP compiles, but I don't remember what since it was several years ago.

One of these maybe?


MinGW-w64 -- a 32/64-bit Build and Development Environment for Windows (CygWin) with minimal toolchain. No GUI IDE. Open-source. Contains GCC
http ...
by Bo Persson
Tue Jan 11, 2011 7:07 pm
Forum: General Topics
Topic: Is decompilation legal?
Replies: 12
Views: 4206

Re: Is decompilation legal?

I have read of software companies accused of stealing or lawfully obtaining disassembled code, hiring a group of new programmers (new to that company), who have never seen the code in question, and giving them the job of coding up functions that meet certain criteria. Then, using the best of what ...
by Bo Persson
Wed Sep 29, 2010 4:53 pm
Forum: Programming and Technical Discussions
Topic: Copy Board vs Unmake Move
Replies: 8
Views: 9299

Re: Copy Board vs Unmake Move

Which is most efficient depends a lot on how large a state your program keeps. You can either use copy-and-discard, or make-unmake. The amount of memory traffic produced by each method, determines what will be the fastest.

A make-unmake might keep the data in the same cache lines for a longer time ...
by Bo Persson
Tue Jul 13, 2010 4:45 pm
Forum: General Topics
Topic: Ivanhoe question: default, popcnt, or prefetch?
Replies: 1
Views: 1560

Re: Ivanhoe question: default, popcnt, or prefetch?

The Ivanhoe RAR file that I downloaded from http://www.chesslogik.com/downloads/IvanHoe_999957a.rar has engines under each of three folders: default , popcnt , and prefetch .

Which one should I use? What is the difference?

Thanks

The default should work on most hardware. The others might be ...