DescriptionOptimise 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. #
Messages
Total messages: 15 (0 generated)
|