After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 743962 - grey: Use memcpy instead of a loop
grey: Use memcpy instead of a loop
Status: RESOLVED FIXED
Product: GEGL
Classification: Other
Component: operations
git master
Other All
: Normal normal
: ---
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks:
 
 
Reported: 2015-02-04 07:39 UTC by Debarshi Ray
Modified: 2015-05-23 20:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
operations/common/grey: Use memcpy instead of a loop (873 bytes, patch)
2015-02-04 07:41 UTC, Debarshi Ray
none Details | Review
operations/common/grey: Use memcpy instead of a loop (1.00 KB, patch)
2015-02-04 07:45 UTC, Debarshi Ray
none Details | Review

Description Debarshi Ray 2015-02-04 07:39:21 UTC
The gegl:grey operation copies the input buffer to the output. I would expect memcpy to be faster than a hand-written loop because the C library would have several optimized implementations depending on the CPU. We already use memcpy for similar purposes in other operations (eg., gegl:red-eye-removal), so let's use it here too.
Comment 1 Debarshi Ray 2015-02-04 07:41:41 UTC
Created attachment 296069 [details] [review]
operations/common/grey: Use memcpy instead of a loop
Comment 2 Debarshi Ray 2015-02-04 07:45:20 UTC
Created attachment 296071 [details] [review]
operations/common/grey: Use memcpy instead of a loop

Include string.h
Comment 3 Øyvind Kolås (pippin) 2015-05-23 20:46:06 UTC
commit bc1429126065ceb84a7a7ee98d521971ec87cb43
Author: Debarshi Ray <debarshir@gnome.org>
Date:   Wed Feb 4 08:41:04 2015 +0100

    operations/common/grey: Use memcpy instead of a loop
    
    https://bugzilla.gnome.org/show_bug.cgi?id=743962