Page 6 of 6

Re: SMP, first shot at implementation

Posted: Tue Sep 15, 2020 11:24 pm
by BlueStar
Joost Buijs wrote:
Tue Sep 15, 2020 4:48 am

It is true that you can write a strong engine in a slow language, but why should you throw away Elo by not using the fastest language there is?

I've been busy with this stuff for 43 years and used all Borland/Embarcadero languages from Turbo Pascal/Turbo C to Delphi and C++ Builder, these compilers always generate slower code than a modern C/C++ compiler like GCC or CLang. Maybe the differences are small (20% or so), but still so large that I'm not going to use it.

Of course it is possible to develop a Pascal compiler with the same quality of code generation and optimization as current C/C++ compilers have, it doesn't have to to anything with the language by itself, it's just that the compilers are worse.
Its funny, the compiler I am using started as "Turbo Prolog" that I picked up in the 80's. As you say, you have been doing this for 43 years (I'm not much younger than you :D ), so you could probably write a new engine in the back of your head in speudo-code. But if you are writing an engine for the very first time (from scratch--not cut/copy/pasters), the chances of being competitive with the high end engines right away is unlikely--even if your using the fastest compiler known. So a higher level, strict, type safe language might be beneficial to creating an actual first working engine.

Re: SMP, first shot at implementation

Posted: Wed Sep 16, 2020 6:07 am
by Joost Buijs
BlueStar wrote:
Tue Sep 15, 2020 11:24 pm
Joost Buijs wrote:
Tue Sep 15, 2020 4:48 am

It is true that you can write a strong engine in a slow language, but why should you throw away Elo by not using the fastest language there is?

I've been busy with this stuff for 43 years and used all Borland/Embarcadero languages from Turbo Pascal/Turbo C to Delphi and C++ Builder, these compilers always generate slower code than a modern C/C++ compiler like GCC or CLang. Maybe the differences are small (20% or so), but still so large that I'm not going to use it.

Of course it is possible to develop a Pascal compiler with the same quality of code generation and optimization as current C/C++ compilers have, it doesn't have to to anything with the language by itself, it's just that the compilers are worse.
Its funny, the compiler I am using started as "Turbo Prolog" that I picked up in the 80's. As you say, you have been doing this for 43 years (I'm not much younger than you :D ), so you could probably write a new engine in the back of your head in speudo-code. But if you are writing an engine for the very first time (from scratch--not cut/copy/pasters), the chances of being competitive with the high end engines right away is unlikely--even if your using the fastest compiler known. So a higher level, strict, type safe language might be beneficial to creating an actual first working engine.
The first C compiler I used on MSDOS was Datalight/Zortech C made by the company of Walter Bright, this was around 1983. I also used Lattice C for a while.

I always write my engines from scratch, my current engine is the 7th incarnation, the only code it uses from somebody else is Nalimovs EGTB code because it would be too much work to write this from scratch.

Next week I'll be 68 and I notice that programming goes much slower than in the past, things that I used to do in 2 weeks now take 2 months. I have a totally new version of my engine almost ready, somehow I can't make myself finishing it. It's also because I'm getting a bit Chess tired, 15 years ago I stopped actively playing Chess in clubs myself.

Re: SMP, first shot at implementation

Posted: Wed Sep 16, 2020 10:22 am
by Dann Corbit
Joost Buijs wrote:
Wed Sep 16, 2020 6:07 am
The first C compiler I used on MSDOS was Datalight/Zortech C made by the company of Walter Bright, this was around 1983. I also used Lattice C for a while.
I used both of those. Also Manx C and the Microsoft C compiler.
Those were all before the days of ANSI/ISO C, when the vendors did whatever they liked.
The header files you had to include were all different.

Code was full of #ifdef <some_darn_thing>
to handle all the craziness.
You might have to link in a special object if you were using compiler <x> instead of >y>

When the ANSI/ISO C standard came out, it was such a relief. I immediately fell in love with language standards.

On the other hand, the C code I wrote for font manipulation totally smoked the Fortran stuff it replaced.

Re: SMP, first shot at implementation

Posted: Wed Sep 16, 2020 10:42 am
by Joost Buijs
Dann Corbit wrote:
Wed Sep 16, 2020 10:22 am
I used both of those. Also Manx C and the Microsoft C compiler.
Those were all before the days of ANSI/ISO C, when the vendors did whatever they liked.
The header files you had to include were all different.
It's a pity that I lost all these ancient compilers, they came on floppy disks and at some time they were not readable anymore.
The oldest ones I stilll have on the original CD's are Visual C++ 4.2, Watcom C++ 10.5 and Microsoft Fortran Powerstation Pro, these are all from the mid 90s. I also have an old version of Borland Turbo-C somewhere in a backup, this one is from the late 80s.