delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/16/07:12:41

Date: Sun, 16 Nov 1997 14:10:09 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Brian Hogg <bhogg AT worldchat DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Text Routines in DJGPP
In-Reply-To: <64j7pg$292$1@news1.worldchat.com>
Message-ID: <Pine.SUN.3.91.971116140635.358V-100000@is>
MIME-Version: 1.0

On 15 Nov 1997, Brian Hogg wrote:

> Functions like cprintf() are too slow and
> maybe it's something I'm doing but it should be optimized...

We can't tell unless you post some code fragment.

If your strings are constant (i.e., you don't need to format them with 
"%d", "%f" and such likes), use cputs, which is faster.  If you have a 
buffer with video attributes ready, or if you don't care about the 
attributes, use `dosmemput' to blit it directly to the VRAM.

> how big
> of a difference does the -O2 -O3 -O make to these routines?

None.  `cprintf' was already compiled (with -O3) when the library was 
created.  Nothing you do during compilation of your program can change 
the code inside `cprintf'.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019