Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Issue 1361813002: replace random with fastrand (Closed)

Created:
5 years, 3 months ago by fbarchard1
Modified:
5 years, 3 months ago
Reviewers:
harryjin
Base URL:
https://chromium.googlesource.com/libyuv/libyuv@master
Target Ref:
refs/heads/master
Project:
libyuv
Visibility:
Public.

Description

Replace random with fastrand 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 Committed: https://chromium.googlesource.com/libyuv/libyuv/+/16f12b58cc8f04b4810b7af31a4009160dd724c0

Patch Set 1 #

Patch Set 2 : remove win32 version of random #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -116 lines) Patch
M unit_test/color_test.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M unit_test/compare_test.cc View 4 chunks +8 lines, -13 lines 0 comments Download
M unit_test/convert_test.cc View 19 chunks +34 lines, -51 lines 0 comments Download
M unit_test/math_test.cc View 3 chunks +0 lines, -3 lines 0 comments Download
M unit_test/planar_test.cc View 14 chunks +19 lines, -31 lines 0 comments Download
M unit_test/rotate_argb_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M unit_test/rotate_test.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M unit_test/scale_argb_test.cc View 2 chunks +1 line, -4 lines 0 comments Download
M unit_test/scale_color_test.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M unit_test/scale_test.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M unit_test/unit_test.h View 1 2 chunks +8 lines, -5 lines 0 comments Download
M unit_test/unit_test.cc View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
fbarchard1
5 years, 3 months ago (2015-09-22 22:34:29 UTC) #1
harryjin
lgtm
5 years, 3 months ago (2015-09-22 22:42:38 UTC) #2
fbarchard
https://codereview.chromium.org/1361813002 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 ...
5 years, 3 months ago (2015-09-22 22:45:09 UTC) #3
fbarchard1
5 years, 3 months ago (2015-09-22 22:47:40 UTC) #4
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
16f12b58cc8f04b4810b7af31a4009160dd724c0 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698