Giter VIP home page Giter VIP logo

Comments (16)

lemire avatar lemire commented on June 3, 2024 3

This may be relevant:

Faster 64-bit universal hashing using carry-less multiplications, Journal of Cryptographic Engineering 6(3), 2016

Source code

from wyhash.

wangyi-fudan avatar wangyi-fudan commented on June 3, 2024

The draft becomes a version now. As you known, I update it too quickly because I stay at home due to the flu. Test it and enjoy it but no hurry to update :-)

from wyhash.

ktprime avatar ktprime commented on June 3, 2024

__builtin_popcountll can not used on ms vc++(_mm_popcnt_u64)

from wyhash.

wangyi-fudan avatar wangyi-fudan commented on June 3, 2024

done.
In order to be fast, I also provide WYHASH_PART define, which means no avalanche finalization is performed. It breaks many quallity rules, however, it offer uncompetable performance for hash table.
hash short hashmap bulk16M
wyhash_part 281.818 53.466 23.536
wyhash 258.874 47.490 23.873

from wyhash.

ktprime avatar ktprime commented on June 3, 2024

add support clang compiler with marco clang

from wyhash.

wangyi-fudan avatar wangyi-fudan commented on June 3, 2024

I am not familar with clang, can you help me by a pull request?

from wyhash.

ktprime avatar ktprime commented on June 3, 2024

your can download form https://github.com/llvm/llvm-project/releases/tag/llvmorg-9.0.1,
use is same as gcc on no-win os. And it can be easy integrated in vs 2017/2019.

I have change some of your code https://github.com/ktprime/emhash/blob/master/thirdparty/wyhash.h
I use wyhash in my c++ flast hash map(string key), speed is the key factor.

from wyhash.

gzm55 avatar gzm55 commented on June 3, 2024

try https://travis-ci.org/ to trigger test matrix for all supported compilers after each commit

from wyhash.

gzm55 avatar gzm55 commented on June 3, 2024

in _wyhash function, the bulk processing part could be implemented via SSE/AVX instructions.

from wyhash.

wangyi-fudan avatar wangyi-fudan commented on June 3, 2024

really? I know that AVX has 32 X 32 => 64 function, but what I need is 64 X 64 =>128 function. would you give me more hints (instruction name)? thanks!

from wyhash.

wangyi-fudan avatar wangyi-fudan commented on June 3, 2024

PMULUDQ ?

from wyhash.

gzm55 avatar gzm55 commented on June 3, 2024

yes, 64bit MUL can only get low 64bit result now.

But vectorizing 32-bit version MUM could still speed up for long keys.

PS, v5 is a little slow for shot keys, although reducing one xor operation, but we could have to use cycles for loading memory from secret[6] not const _wyp*.

from wyhash.

wangyi-fudan avatar wangyi-fudan commented on June 3, 2024

But vectorizing 32-bit version MUM could still speed up for long keys.
the magic is 32 X 32 will fail tests, while 64 X 64 passes tests.

PS, v5 is a little slow for shot keys, although reducing one xor operation, but we could have to use cycles for loading memory from secret[6] not const _wyp*.
you can make_secret offline, write it to a include file as constant.

from wyhash.

cocowalla avatar cocowalla commented on June 3, 2024

I doubt it helps here, but my C# port uses BMI2's MULX operation, which gives both the high and parts in a single operation, providing a nice speed up.

But I would presume the C compiler would automatically use this, or an equivelant.

from wyhash.

lemire avatar lemire commented on June 3, 2024

On x64, you can always get the low and high 64-bit components in one instruction. The mulx is there mostly to help with dependencies.

from wyhash.

cocowalla avatar cocowalla commented on June 3, 2024

On x64, you can always get the low and high 64-bit components in one instruction. The mulx is there mostly to help with dependencies.

Not in .NET you don't 😖

from wyhash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.