Re: Assembly string functions in i386 libc



:Since strlen() is used in every program directly or indirectly through
:libc, I thought it was beneficial to make it faster. In the case of
:i386, the C version used by all the other architectures, except for ARM,
:is much faster that the assembly version. This is without any
:optimization on its part.
:
:I need to test out grep (FreeGrep) to see how it behaves when calling
:regexec() (may use strlen() in certain cases) many times (i.e., grep -R
:on the source tree) using both versions.
:
:Sean
:--
:scf@xxxxxxxxxxx

Yes, but there's a difference between using strlen() a couple of
times in the program and using it in a core processing loop or
other high-performance element of the program. And even if it is
used in such places it isn't going to be used so often that the
program would actually benefit from the few nanoseconds of improvement
you might get from it. The chances of that are nearly zero.

-Matt
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Best Way to Create String Variables in Assembly
    ... of using assembly when I start using malloc. ... what advantage do you gain by making the syscall over calling malloc, ... libc is a particularly bad thing. ... memory management is one of those subjects in computer ...
    (alt.lang.asm)
  • Re: dlsym(RTLD_NEXT) and weak symbols
    ... Maxim Sobolev wrote: ... I am not sure if it has even worked correctly, but calling dlsymreturns reference to the dlopenfunction in the libc, not reference to dlopenfunction in the ld-elf.so. ...
    (freebsd-current)
  • dlsym(RTLD_NEXT) and weak symbols
    ... I am not sure if it has even worked correctly, but calling dlsymreturns reference to the dlopenfunction in the libc, not reference to dlopenfunction in the ld-elf.so. ... IMHO this is incorrect and is probably part of the bigger problem. ...
    (freebsd-current)
  • Sun Studio option to generate quad-precision fp instructions on SPARC ?
    ... quad-precision fp instructions instead of calling the emulation hooks in ... libc? ...
    (comp.unix.solaris)