Closed robertlipe closed 3 years ago
@robertlipe thanks for raising this PR now that we have reorganized the branches
@tekkamanninja @avpatel @lbmeng could you please take a look?
@avpatel should this sent to the mailing list instead?
Overall, patch looks good so please go ahead and send it to mailing list
Regards, Anup
Please submit to the opensbi mailing as @avpatel sugested as this should go to opensbi upstream
This is already my third generation. I'm over it.
On Wed, Jul 7, 2021, 2:21 PM Drew Fustini @.***> wrote:
Closed #3 https://github.com/starfive-tech/opensbi/pull/3.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/starfive-tech/opensbi/pull/3#event-4990756230, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCSD32VDNNM2OTFV323ZQTTWSLJRANCNFSM45SRKR4A .
Minor optimization to sbi_strlen
There are algorthimically more clever ways to do strlen(), but the original implementation has a hot loop of 4 opcodes instead of 3. This changes the per-character body from:
to
While keeping the source CS101 level of complexity.
strnlen() could probably benefit from a similar change...
Originally from: https://github.com/starfive-tech/sft-riscv-opensbi/pull/2/files ...and https://github.com/starfive-tech/opensbi/pull/2