Thread (2 messages) 2 messages, 2 authors, 2015-06-12

Re: [PATCH] drivers/video/fbdev/sis/sis_main.c: avoid repeated strlen() calls

flat view

From: Tomi Valkeinen <hidden>
Date: 2015-06-12 09:36:31
Also in: lkml


On 09/06/15 16:04, Rasmus Villemoes wrote:
gcc is not smart enough to realize that strlen(strbuf1) cannot be
changed by the loop body, so it is forced to recompute it, at least in
the branch containing the assignment. Avoid this by using an
equivalent stopping condition.
Does it matter? Is sisfb calling sisfb_search_mode thousands of times?

 Tomi

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help