home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / vxworks / 1193 < prev    next >
Encoding:
Internet Message Format  |  1993-01-12  |  2.5 KB

  1. Path: sparky!uunet!stanford.edu!agate!dog.ee.lbl.gov!lbl.gov!vxwexplo
  2. From: Roeber <fjr@ssd.ray.com>
  3. Newsgroups: comp.os.vxworks
  4. Subject: re:  performance of fprintf() for floating point
  5. Date: Tue, 12 Jan 1993 08:58:24 -0500
  6. Organization: Lawrence Berkeley Laboratory, Berkeley CA
  7. Lines: 62
  8. Sender: vxwexplo@lbl.gov
  9. Message-ID: <199301121358.AA21035@pike.ssd.ray.com>
  10. NNTP-Posting-Host: 128.3.112.16
  11. Originator: daemon@vxw.ee.lbl.gov
  12.  
  13. Joe Van Andel writes:
  14.  
  15. >  On a MVME133 (68020 @ 20Mhz), running under VxWorks 5.02b, release 1, I
  16. >  can only write 3-4 lines/second, even if I'm writing to "/null".  The
  17. >  MVME133 has a co-processor, and I can't figure out what could possibly
  18. >  be taking so long . .
  19.  
  20. Below is an old message on the subject:
  21.  
  22. ---------- Begin Forwarded Message ----------
  23.  
  24.     I did some grinding and got the cvtb (2) routine to go much faster.
  25.  
  26.                
  27.     The Results:
  28.  
  29.         Hardware:
  30.             mvme133xt, 25MHz, 68020
  31.  
  32.         Test:
  33.             timexN sprintf, y, "%7.2lf", x
  34.              
  35.         Old cvtb (2) without floating point CP: 33 ms
  36.         Old cvtb (2) with floating point CP:    16 ms
  37.  
  38.         New cvtb (2) without floating point CP: 9 ms
  39.         New cvtb (2) with floating point CP:    2 ms
  40.  
  41.  
  42.     That is about as good as I'm going to get it without spending much more
  43.     time.  But is this fast enough for you?  Your whole conversion will still
  44.     take 10-15 ms.  (15 times faster)  That's well above your motor latency.
  45.  
  46.     So tell me what you want...
  47.  
  48.         I can give you a new floatLib.o for your library.
  49.         Or if you want to try to grind this code some more I could even
  50.         send you source to floatLib.c.
  51.  
  52.     The moral of the story is floating point conversions to ascii are very
  53.     expensive operations.  Not too much I can do about that.
  54.  
  55.  
  56.         John Fogelin
  57.  
  58.         Wind River Systems
  59.  
  60. ---------- Begin Forwarded Message ----------
  61.  
  62. At a later point Alan Biocca posted a routine for fast printing of floating
  63. point numbers on 680X0 processors.  I am not sure but the routine might
  64. be in the VxWorks archive.    Fred
  65.  
  66.     _______________________________________________________
  67.    |  Fred J Roeber,  Raytheon Submarine Signal Division   |
  68.    |  1847 West Main Road,  Mail Stop 188                  |
  69.    |  Portsmouth, RI  02871-1087  (401) 847-8000 (X4205)   |
  70.    |                                                       |
  71.    |                   fjr@ssd.ray.com                     |
  72.    |_______________________________________________________|
  73.  
  74.  
  75.