Commit Graph

6 Commits

Author SHA1 Message Date
Amanieu d'Antras
6b6db5cc84 Disable some PPC64 tests which are failing due to an LLVM(?) bug
See https://github.com/rust-lang/rust/issues/99853
2022-07-28 16:02:04 +01:00
David Hoppenbrouwers
e7a8932e3b
Fix CI, better memcmp tests 2022-05-28 00:10:55 +02:00
David Hoppenbrouwers
d6650678de
Fix formatting 2022-05-27 22:37:54 +02:00
David Hoppenbrouwers
4dbd8387f9
Implement faster memcmp for x86_64
x86_64 can load unaligned words in a single cache line as fast as
aligned words. Even when crossing cache or page boundaries it is just as
fast to do an unaligned word read instead of multiple byte reads.

Also add a couple more tests & benchmarks.
2022-05-27 21:58:39 +02:00
Gary Guo
d282412f70 Add test cases for memcpy, memmove and memset for different alignment 2021-08-21 03:01:39 +01:00
Joseph Richey
34e35d74b6
Use REP MOVSQ/STOSQ on x86_64 (#365)
* mem: Move mem* functions to separate directory

Signed-off-by: Joe Richey <joerichey@google.com>

* memcpy: Create separate memcpy.rs file

Signed-off-by: Joe Richey <joerichey@google.com>

* benches: Add benchmarks for mem* functions

This allows comparing the "normal" implementations to the
implementations provided by this crate.

Signed-off-by: Joe Richey <joerichey@google.com>

* mem: Add REP MOVSB/STOSB implementations

The assembly generated seems correct:
    https://rust.godbolt.org/z/GGnec8

Signed-off-by: Joe Richey <joerichey@google.com>

* mem: Add documentations for REP string insturctions

Signed-off-by: Joe Richey <joerichey@google.com>

* Use quad-word rep string instructions

Signed-off-by: Joe Richey <joerichey@google.com>

* Prevent panic when compiled in debug mode

Signed-off-by: Joe Richey <joerichey@google.com>

* Add tests for mem* functions

Signed-off-by: Joe Richey <joerichey@google.com>

* Add build/test with the "asm" feature

Signed-off-by: Joe Richey <joerichey@google.com>

* Add byte length to Bencher

Signed-off-by: Joe Richey <joerichey@google.com>
2020-10-24 10:58:04 -05:00