Skip to content

Replace strlen with sizeof for kconfig string#2025

Merged
pkarashchenko merged 1 commit intoapache:masterfrom
xiaoxiang781216:sizeof
Sep 2, 2023
Merged

Replace strlen with sizeof for kconfig string#2025
pkarashchenko merged 1 commit intoapache:masterfrom
xiaoxiang781216:sizeof

Conversation

@xiaoxiang781216
Copy link
Copy Markdown
Contributor

Summary

improve the speed and reduce the code size a little bit

Impact

code refactor

Testing

ci

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
@pkarashchenko
Copy link
Copy Markdown
Contributor

I think it will not bring a speed and size impact. Maybe only with O0. I've experimented with similar things in the past and compiler computes all possible things at compile time so strlen call will not be inserted, but the computed value will be used.

@pkarashchenko pkarashchenko merged commit 6aa05b5 into apache:master Sep 2, 2023
@xiaoxiang781216 xiaoxiang781216 deleted the sizeof branch September 2, 2023 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants