Author: Mathieu Pagé
Date: 12:16:17 08/15/04
Go up one level in this thread
On August 15, 2004 at 12:13:59, Uri Blass wrote: >On August 15, 2004 at 12:01:56, Andrew Platt wrote: > >>Do not underestimate the cost of writing to Windows terminals! Particularly if >>the output is unbuffered it can be quite intense. Try this: Open a file as a >>test and send the output to there (default buffering of fopen is fine). See if >>you see the same slowdown. >> >>Andy. > >It cannot be the cost of writing because the difference between times when there >is no additional writing is also significantly bigger. > >I do not understand what is unbuffered output. > >I use fflush(stdout) after every printf but I know that I need to use >fflush(stdout) after lines that I print (otherwise the program may work in text >mode but not under winboard) Hi Uri, You are right, in order to work in Winboard you need to do fflush() after each output if you want winboard to get it instantly. However there is some informations that you send to winboard that did not need to be send so rapidely (like PV informations). So I sugest you to try (i did not) to use fflush only after critical informations like returning move, pong, etc. But not after pv. I'm absolutely not sure if it will help, so you should test it. Mathieu P.
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.