Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Threads

Author: KarinsDad

Date: 10:18:59 04/07/99

Go up one level in this thread


On April 07, 1999 at 12:12:52, Bruce Moreland wrote:

[snip]
>
>Anybody who spends time rewriting Windows API calls in assembly code is probably
>making a huge mistake, since somebody who knows what they are doing has spent a
>lot of time on those calls, typically.
>
>bruce

Bruce,

Yes, I agree with most of what you say with one exception. A system call takes
up quite a bit of overhead. This overhead is not noticed in most applications
since the programs are not performance critical. And yes, in a chess
application, you would do your best to stay out of critical sections (i.e. you
wouldn't want to hit a critical section everytime you touch a bitmap). However,
without knowing how much this would be used, my caution is to avoid system calls
if you can if you have to call them a lot. For example, Microsoft took their NT
video code out of the kernel and put it into user mode due to the fact that
every video call (and there are a lot of them) would have to switch from user
mode to kernel mode and back and video was originally dog slow. Of course once
you get to the code itself in the kernel, it will probably run better and faster
than most anything you could write on your own.

James,

As for writing it in assembly, that is probably not necessary (unless you hit
this code constantly). My only point is to avoid the system call when needed if
you can. Although in the short term, just use the api call for now and determine
later if it takes too much time.

KarinsDad



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.