• Frank Barchard's avatar
    Replace random with fastrand · 16f12b58
    Frank Barchard authored
    random / rand is slow and impacts performance testing.
    Although its only called to clear a frame once, a typical profile shows
    it high in the overall profile, when doing 1000 frames for a benchmark.
    
    95.10%  libyuv_unittest  libyuv_unittest      [.] YUY2ToARGBRow_SSSE3
     2.01%  libyuv_unittest  libc-2.19.so         [.] __random_r
     1.13%  libyuv_unittest  libc-2.19.so         [.] __random
    
    Replace random is a faster version for unittests.
    
    set LIBYUV_WIDTH=1280
    set LIBYUV_HEIGHT=720
    set LIBYUV_REPEAT=999
    set LIBYUV_FLAGS=-1
    out\release\libyuv_unittest --gtest_filter=*YUY2ToARGB*  | findms
    
    Was
    libyuvTest.YUY2ToARGB_Opt (497 ms)
    
    Now
    libyuvTest.YUY2ToARGB_Opt (454 ms)
    
    R=harryjin@google.com
    BUG=none
    
    Review URL: https://codereview.chromium.org/1361813002 .
    16f12b58
Name
Last commit
Last update
..
testdata Loading commit data...
basictypes_test.cc Loading commit data...
color_test.cc Loading commit data...
compare_test.cc Loading commit data...
convert_test.cc Loading commit data...
cpu_test.cc Loading commit data...
math_test.cc Loading commit data...
planar_test.cc Loading commit data...
rotate_argb_test.cc Loading commit data...
rotate_test.cc Loading commit data...
scale_argb_test.cc Loading commit data...
scale_color_test.cc Loading commit data...
scale_test.cc Loading commit data...
unit_test.cc Loading commit data...
unit_test.h Loading commit data...
version_test.cc Loading commit data...
video_common_test.cc Loading commit data...