3 ms·
> they will be aligned (all lowest bits being zero at the start I don't think so. At the start k will be equal to keyIn, which can point to any arbitrary memor
by teo_zero 2y ago
> they will be aligned (all lowest bits being zero at the start
I don't think so. At the start k will be equal to keyIn, which can point to any arbitrary memory location.
- rerdavies 2y agoBut in practice, will always point to the start of a buffer allocated from the heap which will be aligned.
- teo_zero 2y agoWhy? If you are hashing names, for example, or keywords, they can begin at whatever position inside the buffer. The case where you allocate a buffer, populate it with random contents and hash the whole of it is an artificial setup for benchmarking, but far from real use cases.
- xxs 2y agoi was about to answer pretty much as 'rerdavies' did. If you have such requirements the specific architectures would need wrappers to copy the data, or do pref/post fix up (ala crc32 & avx implementations on non perfect boundary)