home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!ornl!sunova!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!news.funet.fi!funic!nntp.hut.fi!nntp!jraja
- From: jraja@vipunen.hut.fi (Jarno Tapio Rajahalme)
- Subject: Re: Improved ByteRun algorithm for programmers.
- In-Reply-To: pochanay@cae.wisc.edu's message of 8 Dec 92 12:27:57 CST
- Message-ID: <JRAJA.92Dec13191720@vipunen.hut.fi>
- Sender: usenet@nntp.hut.fi (Usenet pseudouser id)
- Nntp-Posting-Host: vipunen.hut.fi
- Organization: Helsinki University of Technology, Finland
- References: <1992Dec8.122757.27543@doug.cae.wisc.edu>
- Date: 13 Dec 92 19:17:20
- Lines: 40
-
- In article <1992Dec8.122757.27543@doug.cae.wisc.edu> pochanay@cae.wisc.edu (Adisak Pochanayon) writes:
-
- *********************************
-
- upb_startit
- moveq.l #0,d0 ; Require to clear MSB of d0 for dbf loops
- ; Which is $FF after dbf loops
-
- move.b (a0)+,d0 ; Load byte-tag into d0 and test byte-tag
-
- beq.s upb_out ; Zero -> quit
-
- bmi.s upb_copyit ; Negative -> COPY bytes literally
-
- ; Else Repeat a byte (Positive)
-
- *********************************
-
- This would be even faster if you exhanged the order of the beq.s and
- bmi.s, because there will be only one zero anyway. So don't dother to
- check for it too early.
-
- upb_copyit
- bclr.b d2,d0 ; Clear bit seven in d0
-
- Wouldn't standard neg.b be faster than bclr.b ?
-
- I am also surprised that no one has asked me about the infinite scroll
- window method I had talked about earlier.
-
- Tell me, I'm curious :-)
-
-
- Jarno
- --
- -----------------------------------------------------------------------------
- | Address: Jarno Rajahalme | EMail: |
- | Servin Maijan tie 12 H 111 | Jarno.Rajahalme@hut.fi |
- | 02150 ESPOO, FINLAND | tel: +358 0 468 2891 |
- -----------------------------------------------------------------------------
-