WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
125001
[WebGL] Unnecessary condition check in the while loop
https://bugs.webkit.org/show_bug.cgi?id=125001
Summary
[WebGL] Unnecessary condition check in the while loop
Przemyslaw Szymanski
Reported
2013-11-28 23:18:49 PST
In this situation a while loop needs to make an unnecessary check at the begining. This loop is designed to make at least one iteration. In this case a better option is to use do-while. And it is also a good practice not to make such code.
Attachments
patch
(1.72 KB, patch)
2013-11-29 02:39 PST
,
Przemyslaw Szymanski
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Przemyslaw Szymanski
Comment 1
2013-11-29 02:39:37 PST
Created
attachment 218047
[details]
patch
Brent Fulgham
Comment 2
2014-01-09 19:36:30 PST
For the simple boolean test, I doubt this has much benefit. Did you do some profiling that showed this as a hotspot? I think your code is probably more correct, but I'm not sure it's worth changing at this point.
WebKit Commit Bot
Comment 3
2015-05-11 03:42:49 PDT
Comment on
attachment 218047
[details]
patch Clearing flags on attachment: 218047 Committed
r184073
: <
http://trac.webkit.org/changeset/184073
>
WebKit Commit Bot
Comment 4
2015-05-11 03:42:53 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug