freevec.org

  • about
  • benchmarks
Home › libfreevec 1.0.4 benchmarks updated!

strncpy()

markos — Tue, 29/01/2008 - 17:59

Description

According to the man page, the strncpy() function is similar to strcpy(), except that at most n bytes of src are copied. Warning: If there is no null byte among the first n bytes of src, the string placed in dest will not be null terminated.. It returns a pointer to the destination string dest.

strncpy() although it's equally important to strcpy(), for some reason it's not usually found in an optimised form in most C libraries -with exceptions of course. Unfortunately, glibc does not have an optimised form, however libfreevec does provide an AltiVec-optimised version.

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

Things appear to be more fair (to the Athlon X2, that is), as no architecture includes an optimised version in the glibc, however it appears apparent just how sad things are when we compare to the AltiVec versions. Apart from that, everything that has been commented elsewhere applies here.

SIMD

  • AltiVec
  • libfreevec
  • Memory
‹ strncmp() up strnlen() ›
  • Login to post comments

Primary links

  • About
    • History of libfreevec
  • Benchmarks
    • libfreevec

Search

User login

  • Request new password

Popular tags

Addition Algorithms AltiVec ARM Benchmarking float Inverse libfreevec Matrix Memory Multiply NEON reference Scale SSE String searching Subtraction Translate Transpose Tutorial
more tags

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





  • about
  • benchmarks

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