mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-05 11:21:09 +03:00
Inline getPacketSequenceNum and getPacketNumSpace
Summary: As it turns out these end up being hot functions. Most of the hotness is it taking the cache miss, but we're able to reduce it from .9% exclusive each to .1-.3% exclusive each by inlining it (which eliminates a `callq` instruction for each). Reviewed By: yangchi Differential Revision: D19069685 fbshipit-source-id: c971a4d1c26a7e48008c36a129e0a842a27ca87f
This commit is contained in:
committed by
Facebook Github Bot
parent
6cccefa164
commit
a2b6dc5453
@@ -64,7 +64,7 @@ void writeCryptoDataProbesToSocketForTest(
|
||||
LongHeader::Types type = LongHeader::Types::Initial) {
|
||||
auto encryptionLevel =
|
||||
protectionTypeToEncryptionLevel(longHeaderTypeToProtectionType(type));
|
||||
auto pnSpace = longHeaderTypeToPacketNumberSpace(type);
|
||||
auto pnSpace = LongHeader::typeToPacketNumberSpace(type);
|
||||
auto scheduler = std::move(FrameScheduler::Builder(
|
||||
conn, encryptionLevel, pnSpace, "Crypto")
|
||||
.cryptoFrames())
|
||||
@@ -75,7 +75,7 @@ void writeCryptoDataProbesToSocketForTest(
|
||||
*conn.clientConnectionId,
|
||||
*conn.serverConnectionId,
|
||||
LongHeaderBuilder(type),
|
||||
longHeaderTypeToPacketNumberSpace(type),
|
||||
LongHeader::typeToPacketNumberSpace(type),
|
||||
scheduler,
|
||||
probesToSend,
|
||||
aead,
|
||||
|
Reference in New Issue
Block a user