Loading ...
Sorry, an error occurred while loading the content.

37422Re: vim 6.3 errors on sunos 4.1.3_U1

Expand Messages
  • Antoine J. Mechelynck
    Aug 9, 2004
      George V. Reilly <george@...> wrote:
      > Antoine J. Mechelynck wrote:
      >
      > > IMHO, a function like strcmp() should not be emulated in C because
      > > of speed constraints. If you want to rewrite it, OK, but do it in
      > > assembly language (and since assembly is inherently non-portable,
      > > write a different version for each possible processor...). For
      > > example, on the i86 family, I believe that REPE CMPSB is
      > > significantly faster than the loop described above in C, even if
      > > you first have to do a REPNE SCASB to find the null byte.
      > >
      > >
      > This fragile approach is worthwhile only if strcmp() is a major
      > bottleneck. Most Vim operations consume minimal amounts of CPU time
      > on a modern gigahertz processor. Even on a decade-old Sparc,
      > rewriting strcmp in assembler is unlikely to yield a noticeable
      > improvement in Vim.

      Vim admittedly spends most of its time waiting for keyboard action. But how
      about commands like :substitute or :helpgrep, which IIUC do quite a lot of
      string comparisons before they return to the wait-for-keyboard state? I
      maintain that whatever the gigaspeed, for something as basic as string
      comparison, you can only afford the fastest of the fast coding.

      Regards,
      Tony.
    • Show all 10 messages in this topic