Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(41)

Issue 5675086: Don't use strlen inside of loop (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 6 months ago by John Bauman
Modified:
13 years, 6 months ago
CC:
angleproject-review_googlegroups.com
Base URL:
https://angleproject.googlecode.com/svn/trunk
Visibility:
Public.

Description

Don't use strlen inside of loop This could hurt performance quite a bit. BUG=296 TEST= Committed: https://code.google.com/p/angleproject/source/detail?r=993

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -10 lines) Patch
M src/libGLESv2/Shader.cpp View 2 chunks +4 lines, -10 lines 0 comments Download

Messages

Total messages: 6
John Bauman
13 years, 6 months ago (2012-02-18 02:10:38 UTC) #1
dgkoch
There's one of those in Program.cpp as well.
13 years, 6 months ago (2012-02-18 05:41:04 UTC) #2
dgkoch
I would have hoped the compiler was smart enough to hoist the strlen out of ...
13 years, 6 months ago (2012-02-21 14:34:19 UTC) #3
zmo
LGTM
13 years, 6 months ago (2012-02-21 18:18:12 UTC) #4
nfullagar
On 2012/02/21 18:18:12, zmo wrote: > LGTM ping? Also, can BUG= in description point to ...
13 years, 6 months ago (2012-02-21 23:23:00 UTC) #5
John Bauman
13 years, 6 months ago (2012-02-21 23:43:36 UTC) #6
On 2012/02/21 14:34:19, dgkoch wrote:
> I would have hoped the compiler was smart enough to hoist the strlen out of
the
> loop condition so that this wouldn't truly be n^2.  In any case, the memcpy
will
> be much more efficient than a character by character copy. 
> 
I think possible aliasing prevents that.

> LGTM, but would prefer if you also fix the one in Program.cpp as well.

Ok, will do.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b