Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  ARM asm memcpy better timings
« previous next »
  • Print
Pages: [1]

Author Topic: ARM asm memcpy better timings  (Read 6141 times)

Offline TP Diffenbach

  • Member
  • *
  • Posts: 62
ARM asm memcpy better timings
« on: July 10, 2006, 07:40:46 PM »
I had already achieved a memcpy that is faster than the uclinux memcpy, for copy lengths > ~ 56 (my version 8). Now I have achieved a memcpy (my version 14) that's as fast or faster than uclinux's for all word-aligned copy lengths, and for all copy lengths of same-aligned dst and src except copy lengths between 4 and 8 bytes (and even then, the difference is less than a millionth of a second per call). ("As fast or faster": I'm ignoring a few copy lengths were uclinux is a few microseconds per 100 calls faster. See if you can find thme on the graphs.)



This is achieved by eschewing some of the more clever code for a brute-force approach, and by having duplicate code for copying 16 and 32 bytes, depending on whether the total copy length  is less than 48 bytes or not. This allows amortized overhead for longer copy lengths, which pays off as a smaller line slope, and no overhead for shorter lengths (where the overhead would swamp the savings from it).


For mis-aligned copy lengths, my memcpy is essentially the same speed as uclinux's (faster or slower depending on copy length) for copy length < ~64, and faster for longer copy lengths.

My memcpy also bests the linux kernel's memcpy, and the C version we currently use in rockbox for ipod.

Take a look at more pretty pictures here;
http://diffenbach.org/rockbox/memcpy/memcpy.comparison.ckue.0.256.html






« Last Edit: July 10, 2006, 09:35:59 PM by TP Diffenbach »
Logged
Note: My use of rockbox tends to be limited to just playing music; I don't use fancy themes, or graphic equalizers, or playlists, or most plugins. So I may not notice when those things don't work, or if a patch of mine interferes with those things; if so, point that out to me.

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  ARM asm memcpy better timings
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.045 seconds with 17 queries.