efl/src
Ali Alzyod c25554c4f2 evas_common: use memcpy to copy pixel buffer
Summary: This function has no special processing when copy data, so using memcpy can enhance performance

Test Plan:
```
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>

typedef unsigned int       DATA32;

static void
oldFunc(DATA32 *src, DATA32 *dst, size_t len)
{
   DATA32 *dst_end = dst + len;
   while (dst < dst_end)
      *dst++ = *src++;
}

static void
newFunc(DATA32 *src, DATA32 *dst, size_t len)
{
   memcpy(dst, src, len * sizeof(DATA32));
}

int main()
{

   int counter = 1000;
   srand(time(NULL));
   DATA32 src[50000] = {0};
   DATA32 dst[50000] = {0};

   for (int i = 0; i < 50000; i++)
      src[i] = rand();

   clock_t start, end;
   double total_Time1 = 0;
   int i;

   start = clock();
   for (i = 0; i < counter; i++)
      oldFunc(src, dst, 50000);
   end = clock();
   total_Time1 = ((double)(end - start)) / CLOCKS_PER_SEC;
   printf("original = %f \n", total_Time1);

   start = clock();
   for (i = 0; i < counter; i++)
      newFunc(src, dst, 50000);
   end = clock();
   total_Time1 = ((double)(end - start)) / CLOCKS_PER_SEC;
   printf("modified = %f \n", total_Time1);
}
```

Reviewers: raster, ManMower, woohyun, Hermet

Reviewed By: Hermet

Subscribers: Hermet, vtorri, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9155
2019-06-25 21:48:42 +09:00
..
benchmarks autotools: REMOVAL! 2019-06-18 08:56:34 +02:00
bin eolian_mono: support eo access modifiers 2019-06-24 19:19:00 +09:00
bindings efl-mono: Add object type support for Eina.Value 2019-06-25 19:11:23 +09:00
edje_external
examples evas vector: add a lottie animation example. 2019-06-21 17:36:17 +09:00
generic replace hton and ntoh family functions with ones defined in eina 2019-02-01 14:25:35 +00:00
lib evas_common: use memcpy to copy pixel buffer 2019-06-25 21:48:42 +09:00
modules evas vector: support json loader for rlottie integration. 2019-06-21 17:35:48 +09:00
scripts eolian: rename @warn_unused and its associated API 2019-05-26 17:41:22 +02:00
static_libs vg_common_json: Set container's alpha color 2019-06-21 17:44:41 +09:00
tests efl-mono: Add object type support for Eina.Value 2019-06-25 19:11:23 +09:00
wayland_protocol