Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mark Harris
Opus
Commits
6391fe82
Commit
6391fe82
authored
May 26, 2009
by
Timothy B. Terriberry
Committed by
Jean-Marc Valin
May 26, 2009
Browse files
Minor optimisation -- using do-while() instead of for() in isqrt32()
parent
7aa0ed40
Changes
1
Hide whitespace changes
Inline
Side-by-side
libcelt/cwrs.c
View file @
6391fe82
...
...
@@ -155,7 +155,7 @@ static unsigned isqrt32(celt_uint32_t _val){
g
=
0
;
bshift
=
EC_ILOG
(
_val
)
-
1
>>
1
;
b
=
1U
<<
bshift
;
for
(;
bshift
>=
0
;
bshift
--
)
{
do
{
celt_uint32_t
t
;
t
=
((
celt_uint32_t
)
g
<<
1
)
+
b
<<
bshift
;
if
(
t
<=
_val
){
...
...
@@ -163,7 +163,9 @@ static unsigned isqrt32(celt_uint32_t _val){
_val
-=
t
;
}
b
>>=
1
;
bshift
--
;
}
while
(
bshift
>=
0
);
return
g
;
}
...
...
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