mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Added Jenkin's hash functions in C++ form
- not much speed difference between SuperFastHash and Jenkin's lookup3 but both are 5-10% faster than what is currently implemented in Foam::string, albeit inlining probably helps there. - TODO: integration with existing infrastructure
This commit is contained in:
40
applications/test/Hashing/hashingTests
Normal file
40
applications/test/Hashing/hashingTests
Normal file
@ -0,0 +1,40 @@
|
||||
/*-------------------------------*- C++ -*---------------------------------*\
|
||||
| ========= |
|
||||
| \\ / OpenFOAM |
|
||||
| \\ / |
|
||||
| \\ / The Open Source CFD Toolbox |
|
||||
| \\/ http://www.OpenFOAM.org |
|
||||
\*-------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
stringList
|
||||
(
|
||||
"The quick brown fox jumps over the lazy dog"
|
||||
"The best hash is the one you don't write yourself!"
|
||||
)
|
||||
|
||||
|
||||
labelList
|
||||
(
|
||||
0
|
||||
1
|
||||
100
|
||||
1000
|
||||
-1
|
||||
-10
|
||||
-100
|
||||
)
|
||||
|
||||
labelListList
|
||||
(
|
||||
(0)
|
||||
(0 0)
|
||||
(0 0 0)
|
||||
(0 1)
|
||||
(100 1000)
|
||||
(0 1 100 1000)
|
||||
)
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
Reference in New Issue
Block a user