Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
228d9224
Commit
228d9224
authored
Dec 15, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimize nghttp2_pq swap
parent
248a64f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
lib/nghttp2_pq.c
lib/nghttp2_pq.c
+7
-5
No files found.
lib/nghttp2_pq.c
View file @
228d9224
...
@@ -44,11 +44,13 @@ void nghttp2_pq_free(nghttp2_pq *pq) {
...
@@ -44,11 +44,13 @@ void nghttp2_pq_free(nghttp2_pq *pq) {
}
}
static
void
swap
(
nghttp2_pq
*
pq
,
size_t
i
,
size_t
j
)
{
static
void
swap
(
nghttp2_pq
*
pq
,
size_t
i
,
size_t
j
)
{
nghttp2_pq_entry
*
t
=
pq
->
q
[
i
];
nghttp2_pq_entry
*
a
=
pq
->
q
[
i
];
pq
->
q
[
i
]
=
pq
->
q
[
j
];
nghttp2_pq_entry
*
b
=
pq
->
q
[
j
];
pq
->
q
[
i
]
->
index
=
i
;
pq
->
q
[
j
]
=
t
;
pq
->
q
[
i
]
=
b
;
pq
->
q
[
j
]
->
index
=
j
;
b
->
index
=
i
;
pq
->
q
[
j
]
=
a
;
a
->
index
=
j
;
}
}
static
void
bubble_up
(
nghttp2_pq
*
pq
,
size_t
index
)
{
static
void
bubble_up
(
nghttp2_pq
*
pq
,
size_t
index
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment