home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / programm / 17399 < prev    next >
Encoding:
Text File  |  1992-12-15  |  1.6 KB  |  39 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!mcsun!news.funet.fi!funic!nntp.hut.fi!nntp!jraja
  3. From: jraja@vipunen.hut.fi (Jarno Tapio Rajahalme)
  4. Subject: Re: Improved ByteRun algorithm for programmers.
  5. In-Reply-To: breese@monet.imada.ou.dk's message of Mon, 14 Dec 1992 16:07:49 GMT
  6. Message-ID: <JRAJA.92Dec15225646@vipunen.hut.fi>
  7. Sender: usenet@nntp.hut.fi (Usenet pseudouser id)
  8. Nntp-Posting-Host: vipunen.hut.fi
  9. Organization: Helsinki University of Technology, Finland
  10. References: <JRAJA.92Dec13191720@vipunen.hut.fi> <1992Dec14.160749.21777@imada.ou.dk>
  11. Date: 15 Dec 92 22:56:46
  12. Lines: 25
  13.  
  14. In article <1992Dec14.160749.21777@imada.ou.dk> breese@monet.imada.ou.dk (Bjoern Reese) writes:
  15.  
  16.    In article <JRAJA.92Dec13191720@vipunen.hut.fi> jraja@vipunen.hut.fi (Jarno  
  17.    Tapio Rajahalme) writes:
  18.    > In article <1992Dec8.122757.27543@doug.cae.wisc.edu> pochanay@cae.wisc.edu  
  19.    (Adisak Pochanayon) writes:
  20.    > 
  21.    >>    upb_copyit
  22.    >>          bclr.b    d2,d0          ; Clear bit seven in d0
  23.    > 
  24.    > Wouldn't standard neg.b be faster than bclr.b ? 
  25.  
  26.    Yes it would, but unfortunately it wouldn't give the same result.
  27.    neg.b does a 2-complementary negation while bclr.b just clears a
  28.    single bit.
  29.  
  30. I just thougth if it would be possible to avoid using d2 (for
  31. _marginal_ speed increase :-), but using neg leads to an unbalanced
  32. algorithm, since the end value would be -128 (instead of zero, could
  33. be detected after neg with bmi), but as stated the branch with
  34. negative codes would be lenghtened by one instruction (while the other
  35. branch would be shorter). Driving some statistics would tell if this
  36. would be slower or faster.
  37.  
  38.     Jarno
  39.