delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/10/18:02:38

From: brunobg AT geocities DOT com (Bruno Barberi Gnecco)
Newsgroups: comp.os.msdos.djgpp
Subject: Analizing profile / what's _doprnt
Date: Sun, 10 May 1998 21:47:25 GMT
Organization: UNINET (Unisys Brasil Internet Access Service)
Lines: 55
Message-ID: <35561e0b.13598072@news.unisys.com.br>
NNTP-Posting-Host: saopm03p02.unisys.com.br
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I've profiled a program, and got this output:

--begin---
Each sample counts as 0.055556 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls  us/call  us/call  name    
 57.94      8.11     8.11                             _doprnt
 16.27     10.39     2.28                             putc
 13.49     12.28     1.89                             fprintf
  4.76     12.94     0.67        1 666666.67 666666.67  main
  3.57     13.44     0.50                             localeconv
  2.38     13.78     0.33                             __dpmi_int
  1.59     14.00     0.22                             __dj_movedata

granularity: each sample hit covers 4 byte(s) for 0.40% of 14.00 seconds
index % time    self  children    called     name
                                                 <spontaneous>
[1]     57.9    8.11    0.00                 _doprnt [1]
-----------------------------------------------
                                                 <spontaneous>
[2]     16.3    2.28    0.00                 putc [2]
-----------------------------------------------
                                                 <spontaneous>
[3]     13.5    1.89    0.00                 fprintf [3]
-----------------------------------------------
                0.67    0.00       1/1           __crt1_startup [5]
[4]      4.8    0.67    0.00       1         main [4]
-----------------------------------------------
                                                 <spontaneous>
[5]      4.8    0.00    0.67                 __crt1_startup [5]
                0.67    0.00       1/1           main [4]
-----------------------------------------------
                                                 <spontaneous>
[6]      3.6    0.50    0.00                 localeconv [6]
-----------------------------------------------
                                                 <spontaneous>
[7]      2.4    0.33    0.00                 __dpmi_int [7]
-----------------------------------------------
                                                 <spontaneous>
[8]      1.6    0.22    0.00                 __dj_movedata [8]
-----------------------------------------------
--end--

	What is this _doprnt? Is there anything to do to improve it?
	Another questions... Why fprintf and putc, if I use just the first one?
Would it be better to output char by char using putc (because the output is made
of string, generated a char a time) instead of fprintf("%s")? Or would be fast way
bufferize it? Is there a faster assembler function to substitute fprintf?
	Thanks,

"There's never enough time to do all the nothing you want" Bill Watterson 
"Is ALL that we see or seem / But a dream within a dream?" - Edgar A. Poe
Bruno Barberi Gnecco <brunobg AT geocities DOT com> ICQ #1383173 - PGP 5.0i user
-=My other OS is Linux=- 3DS4, Max, Rhino, Photoshop and everything about 
computer graphics? It sure is on Graphx Page!!! http://graphx.home.ml.org

- Raw text -


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