Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: speed question about C programs

Author: Eugene Nalimov

Date: 17:11:00 11/27/99

Go up one level in this thread


On November 27, 1999 at 18:15:27, Vincent Lejeune wrote:

>On November 27, 1999 at 17:04:11, Eugene Nalimov wrote:
>
>>On November 27, 1999 at 08:59:51, Vincent Diepeveen wrote:
>>
>>>On November 27, 1999 at 04:16:53, blass uri wrote:
>>>
>>>>Does someone know about a book about the fastest C program to do simple tasks?
>>>>(for example to find if a number is a prime)
>>>
>>>>I think that knowing this information can help to think about ideas how to do
>>>>chess programs faster.
>>>
>>>Let's please distinguish two things
>>>  - used algorithm
>>>  - used implementation
>>>
>>>You can make a very good optimized program A to generate primes,
>>>but a silly implemented other program B might generate at the same
>>>hardware a lot faster primes using a better algorithm.
>>>
>>>In general people then say that program A sucks and that a program B is
>>>wonderful... ...yet from programming viewpoint this is rather hard to do.
>>>
>>>>I understand that +- operations are faster than */ operations but I do not know
>>>>how much faster and if it is dependent on the computer.
>>>
>>>That depends upon architecture.
>>>Multiply is in general not slower than incrementing with a register.
>>>I'm using a lot of multiples in my DIEP's eval.
>>>
>>>At the P5 it sure is very slow. At the PRO/PII/PIII/Xeon it isn't.
>>>Don't know about the K7, but i bet it's not slower there either, as
>>>DIEP runs 15.5% faster on a K7 than on a PIII at the same Mhz.
>>>
>>>>Where can I get information like this information?
>>>
>>>www.intel.com
>>>
>>>Go to the technical references of the CPUs.
>>>K7 is harder.
>>>
>>>>I can find it by doing a simple program but I prefer not to check everything
>>>>about speed by testing because I may have many question like this question.
>>>>Uri
>>>
>>>Rather hard to find it by doing a simple program, measuring things
>>>accurately is also an art in itselve.
>>>
>>>What is however slowing down programs most is not the clocks needed to
>>>do an integer multiplication. The real problem are branches. At the
>>>Merced this should all be solved, so i wonder why the first vague reports
>>>about the merced don't say it to be a lot faster than the 21264 cpu.
>>
>>Yes, but at IA-64 multiplication is *very* slow.
>>
>>Eugene
>
>How is it possible and why intel did that ??

I assure you that it's possible to implement a slow multiplication; more, it's
much easier to do it this way. Why it was done I don't know - maybe because they
don't want for programs to use it, so they later will not have to implement
single-cycle (or even 2-cycles) multiplication on the 2GHz machine in the
future.

Eugene



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.