You are not logged in.
Pages: 1
Thank you, no clue why I missed the ARMV8 Static source in my search.
Any chance you are going to implement something for ARMv7 with NEON, too?
Hi,
Mormot uses crc32c hardware instruction on Intel for hashing, and is damn fast.
The comments in mormot.core.base suggest that there is supposed to also be ASM code for ARM to use the corresponding ARMv7/ARMv8/AArch64 instructions. But unless I am blind, this is not implemented.
We use a lot of targets with 32bit ARMv7, and recently new hardware with AArch64.
Would you please consider to add the missing ARM code so we get faster hashing?
Right now this xxhash32 function is the fastest we could find for ARMv7, and we have been using it for a while now:
https://share.nerdherrschaft.net/d/4b34 … 442a4817c/
For AArch64, here is some amazingly fast code:
https://dougallj.wordpress.com/2022/05/ … -apple-m1/
Maybe you'd want to port that assembler code to mORMot? That would be great.
Also, for x86, I don't know if you have seen this:
https://www.corsix.org/content/fast-crc32c-4k
- might be faster than your existing code for large blocks.
And one question to close this up: According to your blog post, AesNiHash32 is even faster than your crc32c implementation. So why isn't it used as default hasher then...?
Cheers,
Simon / scamp
I recently started using mormot.core.base in a bigger project of mine.
There are a couple of types declared in mormot.core.base which are problematic:
unaligned = Double;
unaligned is a special Typecast in Freepascal that is used to give the compiler a hint for unaligned memory accesses. This is important because ARMv7 and older will issue a system trap if memory is access without that modifier, making your code extermely slow. Sadly FPC does not give it's internal Typecast preference if mormot.core.base is used, so any code that uses the "real" unaligned typecast no longer compiles. You should rename this to remove this clash.
https://www.freepascal.org/docs-html/ref/refse86.html
TByteArray / PByteArray and TWordArray / PWordArray are already declared in SysUtils. If you project has a unit that uses SysUtils and another that uses mormot.core.base, your code will not compile as the compiler sees the clashing type definitions as incompatible types. As mormot.core.base uses sysutils anyway, these duplicate declarations should be removed.
Cheers,
scamp
Pages: 1