Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use memcpy and memset from musl for performance benefit #290

Merged
merged 1 commit into from Nov 30, 2022

Conversation

flaub
Copy link
Member

@flaub flaub commented Nov 30, 2022

This is a re-integration of #277

Base: commit 37e18b7bf307fa4a8c745feebfcba54a0ba74f30

  • src/string/memcpy.c
  • src/string/memset.c

This was compiled into assembly with:

clang-14 -target riscv32 -march=rv32im -O3 -S memcpy.c -nostdlib -fno-builtin -funroll-loops

and labels manually updated to not conflict

License is MIT, see https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT and indicated in the .s files

Signed-off-by: Carsten Munk carsten@zippie.com
Co-authored-by: Carsten Munk carsten@zippie.com

Base: commit 37e18b7bf307fa4a8c745feebfcba54a0ba74f30
- src/string/memcpy.c
- src/string/memset.c

This was compiled into assembly with:

 clang-14 -target riscv32 -march=rv32im -O3 -S memcpy.c -nostdlib -fno-builtin -funroll-loops

and labels manually updated to not conflict

License is MIT, see https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT and indicated in the .s files

Signed-off-by: Carsten Munk <carsten@zippie.com>
Co-authored-by: Carsten Munk <carsten@zippie.com>
@flaub flaub self-assigned this Nov 30, 2022
@flaub flaub enabled auto-merge (squash) November 30, 2022 03:08
@flaub flaub merged commit 21fd334 into main Nov 30, 2022
@flaub flaub deleted the flaub/memset-and-memcpy branch November 30, 2022 03:16
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.

None yet

2 participants