Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Assembly in VC6.0 – an (bad) experience!

Author: José Carlos

Date: 23:58:48 03/14/01

Go up one level in this thread


On March 15, 2001 at 00:18:44, Pham Minh Tri wrote:

>Hi all,
>
>In MS DOS environment, I have written some pieces of code in assembly to speed
>up program and I could double speed by that way. However, when I moved my code
>into Windows and VC6.0 compiler, that method of speedup did not work. I have
>tried several times and measured that the program with some assembly pieces of
>code could be slightly slower than one without them (pure C++, option
>optimization: maximize speed). An annoying result, isn’t it? At end I gave up
>with some conclusions as following:
>
>1) My experience of writing and optimisation assembly is 16 bit one, not good
>enough for 32 bit with many new instructions. However, I little doubt about this
>conclusion because I designed all data structures suitable for 16 bit (I did not
>use Bitboard structure), and many 16-bit instructions are not slower than 32 bit
>(and some others may be quicker).
>
>2) MS VC6.0 compiler may do the best for optimisation of speed. It means we
>could do very little more only.
>
>3) Many functions of chess, which we may convert into assembly code, are not
>complicated, so that a good compiler as VC6.0 could make optimisation as good as
>an expert. People could do better than program in more complicated and graphic
>applications.
>
>4) Because of all above, if I insist, I could get a speedup of 3-5% after a huge
>effort. It is much more expensive than speedup by other way.
>
>Just my thought and experience. Do you get better results or other experiences?
>Pham

  I haven't written assembler pieces in my program, so I cannot say about how
much can assembler speed up the program, but I think you should feel happy if
the compiler does so good job that you don't need to write assembler code,
because this way, you have a more portable and understandable (easy to modify)
code. Don't you think?

  José C.



This page took 0.03 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.