home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19388 < prev    next >
Encoding:
Internet Message Format  |  1993-01-07  |  1.3 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!wupost!csus.edu!netcom.com!netcomsv!ulogic!hartman
  2. From: hartman@ulogic.UUCP (Richard M. Hartman)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Problem with string processing.
  5. Message-ID: <823@ulogic.UUCP>
  6. Date: 7 Jan 93 23:28:12 GMT
  7. References: <MCGLK.93Jan5005833@yang.cpac.washington.edu> <811@ulogic.UUCP> <1993Jan6.162841.5570@taumet.com>
  8. Distribution: usa
  9. Organization: negligable
  10. Lines: 28
  11.  
  12. What I was after was the rough equivilent difference between (Intel)
  13.  
  14.     MOVSW    src,dst
  15.  
  16. and a loop w/ 
  17.  
  18.     MOV ax,src 
  19.     MOV dstax
  20.  
  21. (so sue me if my assembly is wrong...)  The thing is that, yes
  22. each byte does have to get moved, but the one instruction moves
  23. 'em a heck of a lot quicker than the loop of separate instructions.
  24.  
  25. I was postulating a similarly enhanced "search for byte from here"
  26. instruction.
  27.  
  28. OF COURSE all the bytes have to be looked at, but if the CPU
  29. "knows" how to do this in microcode, then you don't have to
  30. waste CPU time loading all those instructions in the loop
  31. over and over again, you just have to load the data.
  32.  
  33.  
  34. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  35. And the men who hold high places    |
  36. must be the ones who start        |    -Richard Hartman    
  37. to mold a new reality            |    hartman@uLogic.COM
  38. closer to the heart!            |
  39.  
  40.