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

Issue 11572010: Optimise MaskWebSocketFramePayload(). (Closed)

Created:
8 years ago by Adam Rice
Modified:
8 years ago
Reviewers:
Takashi Toyoshima
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Optimise MaskWebSocketFramePayload(). Add benchmarks for MaskWebSocketFramePayload(). Add a test to ensure that it gives the correct result regardless of how the input is aligned or chunked. Optimise MaskWebSocketFramePayload() to apply the mask one word at a time instead of one byte at a time. This reduces the time to mask 64k from 0.073ms to 0.008ms on 32bit, and 0.079ms to 0.005ms on 64bit. Input shorter than two words in length is still masked one byte at a time, so there is no significant change in performance for small payloads. TEST=net_unittests --gtest_filter='WebSocketFrameTestMaskBenchmark.*' --websocket-mask-iterations=10000 BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=173448

Patch Set 1 #

Total comments: 10

Patch Set 2 : Fixes from review. #

Patch Set 3 : Compile fix for Windows. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+232 lines, -8 lines) Patch
M net/websockets/websocket_frame.cc View 1 2 chunks +76 lines, -8 lines 0 comments Download
M net/websockets/websocket_frame_unittest.cc View 1 2 2 chunks +156 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
Adam Rice
8 years ago (2012-12-13 11:10:06 UTC) #1
Takashi Toyoshima
Cool. Thank you for performance improvement. I think the TEST line of change description should ...
8 years ago (2012-12-14 07:03:56 UTC) #2
Takashi Toyoshima
https://chromiumcodereview.appspot.com/11572010/diff/1/net/websockets/websocket_frame.cc File net/websockets/websocket_frame.cc (right): https://chromiumcodereview.appspot.com/11572010/diff/1/net/websockets/websocket_frame.cc#newcode157 net/websockets/websocket_frame.cc:157: char* const data, Sorry, I'm not familiar with this ...
8 years ago (2012-12-14 07:04:11 UTC) #3
Adam Rice
https://chromiumcodereview.appspot.com/11572010/diff/1/net/websockets/websocket_frame.cc File net/websockets/websocket_frame.cc (right): https://chromiumcodereview.appspot.com/11572010/diff/1/net/websockets/websocket_frame.cc#newcode157 net/websockets/websocket_frame.cc:157: char* const data, Resolved offline. https://chromiumcodereview.appspot.com/11572010/diff/1/net/websockets/websocket_frame.cc#newcode221 net/websockets/websocket_frame.cc:221: *reinterpret_cast<size_t*>(merged) ^= ...
8 years ago (2012-12-14 08:05:37 UTC) #4
Takashi Toyoshima
Thanks! LGTM.
8 years ago (2012-12-14 08:15:37 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ricea@chromium.org/11572010/2002
8 years ago (2012-12-14 08:47:01 UTC) #6
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years ago (2012-12-14 09:13:54 UTC) #7
Adam Rice
Compile fix for Windows. PTAL.
8 years ago (2012-12-14 09:25:29 UTC) #8
Takashi Toyoshima
still lgtm. I post trybot job for win_rel. After you can see passing this build, ...
8 years ago (2012-12-14 09:37:55 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ricea@chromium.org/11572010/13001
8 years ago (2012-12-14 11:38:01 UTC) #10
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests
8 years ago (2012-12-14 15:39:02 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ricea@chromium.org/11572010/13001
8 years ago (2012-12-15 01:39:00 UTC) #12
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests
8 years ago (2012-12-15 07:56:06 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ricea@chromium.org/11572010/13001
8 years ago (2012-12-17 10:55:05 UTC) #14
commit-bot: I haz the power
8 years ago (2012-12-17 12:00:59 UTC) #15
Message was sent while issue was closed.
Change committed as 173448

Powered by Google App Engine
This is Rietveld 408576698