freevec.org

  • about
  • benchmarks
Home › libfreevec 1.0.4 benchmarks updated!

strlen()

markos — Tue, 29/01/2008 - 18:05

Description

According to the man page, the strlen() function calculates the length of the string s, not including the terminating '\0' character. It returns the number of characters in s.

As we already said in strcpy(), strlen() is probably the #1 used string function. For that reason, along with memcpy()/memcmp(), it's one of the first optimised functions for every arch. Of course, libfreevec provides an AltiVec-optimised version. However, performance is lagging for some CPUs (the G5 in particular) in the libfreevec version, at least for the moment.

Each CPU in detail:

And for comparison here is the result of the same benchmark run on an Athlon X2 5000 (2.5Ghz), running 32-bit code:

Results/Comments

At last, for the first time, we found a string function that performs great on the Athlon X2! Finally someone took the effort to optimise this so common function for the i686 (the 32-bit subarch of most Intel/AMD CPUs, which we're benchmarking). There's not much to say, apart from the fact that the Athlon really beats everything except perhaps for big string sizes, where the MPC8610 wins using the libfreevec strlen(). Strangely, on the G5, glibc is faster than the libfreevec version, which is something we intend to examine further, along with the porting to 64-bit.

Lastly, we have to commend the libmotovec version, which manages to get amazing performance out of AltiVec beating even the Athlon (and this on the plain G4@1Ghz), but which suffers from the same problem of performance drop after a certain string size, unfortunately.

SIMD

  • AltiVec
  • libfreevec
  • String searching
  • Memory
‹ strcpy() up strncmp() ›
  • Login to post comments

Primary links

  • About
    • History of libfreevec
  • Benchmarks
    • libfreevec

Search

User login

  • Request new password

Popular tags

Addition Algebra Algorithms AltiVec Benchmarking float Hashing Identity Inverse libfreevec Matrix Memory Multiply NEON Scale SSE String searching Subtraction Translate Transpose
more tags

Please donate to libfreevec to ensure its continuing development! Donations are done via Paypal.





  • about
  • benchmarks

Copyright (c)2008-2012 by Konstantinos Margaritis.
Powered by Drupal. Using theme Deco.
All Google charts have been created by the CSV Chart and Chart API Drupal modules.