-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#3544 RV64: Optimize private memcpy and memset (#6800)
1. Optimize private memcpy and memset for RV64. 2. Add test to compare private and libc memset. 3. Compare private memcpy with libc memcpy on more small sizes. 4. Fix a bug of core/CMakeLists.txt. For unit_tests, to compare private and libc memcpy, we should link unit_tests to drmemfuncs but not link to libc. Compare original memcpy&memset, optimized private memcpy&memset and glibc memcpy&memset. Test command: ``` ./bin64/unit_tests ``` When we use original memcpy and memset, outputs: ``` our_memcpy_time: size=1 time=0 libc_memcpy_time: size=1 time=2 our_memcpy_time: size=4 time=2 libc_memcpy_time: size=4 time=2 our_memcpy_time: size=128 time=16 libc_memcpy_time: size=128 time=4 our_memcpy_time: size=512 time=57 libc_memcpy_time: size=512 time=7 our_memcpy_time: size=8192 time=824 libc_memcpy_time: size=8192 time=79 our_memcpy_time: size=20480 time=2080 libc_memcpy_time: size=20480 time=183 our_memset_time: 4129 libc_memset_time: 292 io all done testing string done testing string ``` When we use optimized memcpy and memset, outputs: ``` our_memcpy_time: size=1 time=1 libc_memcpy_time: size=1 time=2 our_memcpy_time: size=4 time=1 libc_memcpy_time: size=4 time=3 our_memcpy_time: size=128 time=2 libc_memcpy_time: size=128 time=3 our_memcpy_time: size=512 time=7 libc_memcpy_time: size=512 time=7 our_memcpy_time: size=8192 time=72 libc_memcpy_time: size=8192 time=69 our_memcpy_time: size=20480 time=184 libc_memcpy_time: size=20480 time=175 our_memset_time: 307 libc_memset_time: 302 io all done testing string done testing string ``` Issue: #3544
- Loading branch information
1 parent
73b6ca0
commit ef1cd6f
Showing
3 changed files
with
234 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters