kvrocks icon indicating copy to clipboard operation
kvrocks copied to clipboard

chore: Remove USE_ALIGNED_ACCESS and enhance BYTE_ORDER handling

Open mapleFU opened this issue 1 year ago • 3 comments

Redis uses lot of USE_ALIGNED_ACCESS as the "fastpath" for ARM like archtecture, however, I think modern compiler can handle this kind of optimization well. So this part of code is removed.

Besides, some vendored libraray uses BYTE_ORDER macro, this might not being defined in these files. So I use BYTE_ORDER instead

mapleFU avatar Jul 31 '24 10:07 mapleFU

@git-hulk @PragmaTwice I've paste the result https://github.com/apache/kvrocks/pull/2456#discussion_r1702804569

https://github.com/apache/arrow/blob/45b176716cc667384577a2a1218c6da454854109/cpp/src/arrow/util/bit_util_benchmark.cc#L165-L189

The code runs same speed with highly optimized code in macos, and x86 would share this optimization

mapleFU avatar Aug 03 '24 15:08 mapleFU

@PragmaTwice would you mind check again?

mapleFU avatar Aug 07 '24 12:08 mapleFU