home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 4,202 of 4,675   
   Robert Prins to Bernhard Schornak   
   Re: Working Boyer-Moore search   
   08 Nov 20 18:50:18   
   
   From: robert@nospicedham.prino.org   
      
   On 2020-11-08 12:06, Bernhard Schornak wrote:   
   > Robert Prins wrote:   
   >> (...), I have to think of a smart way of not moving that amount of data (or   
   >> probably half of it) 92 times. Then again, moving a total of 15Mb   
   >> is probably peanuts...   
    >   
   > If you allocate a second block, where you copy already   
   > compared text from the source file, only (with already   
   > replaced patterns!), it is a simple one pass action.   
      
   Yes, that's the best way, but I might settle for a compromise and scan each   
   line   
   before it's added to the output buffer, and go for a part copy, add   
   replacement,   
   copy more, add another replacement, followed by a final copy. The added   
   replacement just consists of 22 characters, so a single YMM VMOVDQU.   
      
   As for the data, there are currently 92 occurrences of 2020, and 86 of them are   
   the only one on a line (in a files with 767 lines). Next year, 2021, will add   
   2+8 lines, 2022 2+8+50 and the years after that 2+8 again until 2029 or so.   
      
   The number of replacements (at the end of the calendar year) is right now maxed   
   out at 94, but as the data is spread over a multitude of tables sorted in   
   various orders, there's no easier way of adding the highlighting, other than of   
   course using a program like "sed".   
      
   Robert   
   --   
   Robert AH Prins   
   robert(a)prino(d)org   
   The hitchhiking grandfather - https://prino.neocities.org/indez.html   
   Some REXX code for use on z/OS - https://prino.neocities.org/zOS/zOS-Tools.html   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca