[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cairo-bugs
Subject:    [cairo-bugs] [Bug 16128] New: optimize swap functions/speed
From:       bugzilla-daemon () freedesktop ! org
Date:       2008-05-28 15:32:45
Message-ID: bug-16128-4039 () http ! bugs ! freedesktop ! org/
[Download RAW message or body]

http://bugs.freedesktop.org/show_bug.cgi?id=16128

           Summary: optimize swap functions/speed improvement possible
           Product: cairo
           Version: 1.6.4
          Platform: All
        OS/Version: All
            Status: RESOLVED
          Severity: enhancement
          Priority: medium
         Component: xlib backend
        AssignedTo: cworth@cworth.org
        ReportedBy: charlet@adacore.com
         QAContact: cairo-bugs@cairographics.org



Behdad Esfahbod <freedesktop@behdad.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


In cairo-xlib-surface.c, it should be possible to get a 2x to 4x speed
improvement
for _swap_ximage_[24]bytes by using facilities provided in <byteswap.h> (under
glibc systems), or by using recent GCC's builtin __builtin_bswap32.

Arno


--- Comment #1 from Arnaud Charlet <charlet@adacore.com>  2008-05-28 02:06:37 PST ---
Created an attachment (id=16783)
 --> (http://bugs.freedesktop.org/attachment.cgi?id=16783)
test program with various byteswap implementations

The test program itself is too simple minded, but this attachment shows
several possible implementations of byteswapping which can be of interest.

$ gcc -O2 byteswap.c -o byteswap
$ ./byteswap 
UINT32_GCC_SWAP
time spent: 1114
cairo code
time spent: 2247
UINT32_SWAP
time spent: 2225
UINT32_GLIBC_SWAP
time spent: 747


--- Comment #2 from Behdad Esfahbod <freedesktop@behdad.org>  2008-05-28 08:32:43 PST ---
commit 5de0650dbbed7a44789f25b0a5226593931a8ce8
Author: Behdad Esfahbod <behdad@behdad.org>
Date:   Wed May 28 10:43:47 2008 -0400

    [cairo-xlib] Add recently-added byteswap macros (#16128)

commit dd8f3a5690e92ac3421e5bbc475cc3e78865d8ef
Author: Behdad Esfahbod <behdad@behdad.org>
Date:   Wed May 28 10:43:22 2008 -0400

    Add support for byteswap macros bswap_16 and bswap_32


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
cairo-bugs mailing list
cairo-bugs@lists.cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic