# SipHash

- Thread: https://externals.io/message/76916
- Original archive: https://news-web.php.net/php.internals/76916
- Started by Sebastian Bergmann on 2014-08-28T08:00:14+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #76916 — Sebastian Bergmann — 2014-08-28T08:00:14+00:00

URL: https://externals.io/message/76916#76916

I recently came across SipHash [1] (which is "a family of pseudorandom
 functions (a.k.a. keyed hash functions) optimized for speed on short
 messages") and am wondering whether it would make sense to add support
 for it to PHP.

 Thoughts?

 --
 [1] https://131002.net/siphash/

---

## #76917 — Pierre Joye — 2014-08-28T08:04:18+00:00

URL: https://externals.io/message/76916#76917 · In reply to: #76916

>  I recently came across SipHash [1] (which is "a family of pseudorandom
>  functions (a.k.a. keyed hash functions) optimized for speed on short
>  messages") and am wondering whether it would make sense to add support
>  for it to PHP.
>
>  Thoughts?

ext/hash can have it anyway. I did not look at it if it makes sense to
use it in other parts.


-- 
Pierre

@pierrejoye | http://www.libgd.org

---

## #76918 — Sebastian Bergmann — 2014-08-28T08:07:54+00:00

URL: https://externals.io/message/76916#76918 · In reply to: #76917

Am 28.08.2014 um 10:04 schrieb Pierre Joye:
> ext/hash can have it anyway. I did not look at it if it makes sense to
> use it in other parts.

 Sorry for not bein more clear: yes, I was thinking about adding it to
 ext/hash, of course. It might make sense, though, to evaluate whether
 it can also be used internally. Other languages seem to have switched
 their hashtable implementation to SipHash.

---

## #76944 — Xinchen Hui — 2014-08-28T09:38:21+00:00

URL: https://externals.io/message/76916#76944 · In reply to: #76918

> Am 28.08.2014 um 10:04 schrieb Pierre Joye:
> > […]
>
>  Sorry for not bein more clear: yes, I was thinking about adding it to
>  ext/hash, of course. It might make sense, though, to evaluate whether
>  it can also be used internally. Other languages seem to have switched
>  their hashtable implementation to SipHash.
hmm,

maybe you could do some benchmark on real-apps?

thanks
>
> --
> 
> 
>



-- 
Xinchen Hui
@Laruence
http://www.laruence.com/

---

## #76923 — johannes@schlueters.de — 2014-08-28T16:48:55+00:00

URL: https://externals.io/message/76916#76923 · In reply to: #76918

> Am 28.08.2014 um 10:04 schrieb Pierre Joye:
> > […]
> 
>  Sorry for not bein more clear: yes, I was thinking about adding it to
>  ext/hash, of course. It might make sense, though, to evaluate whether
>  it can also be used internally. Other languages seem to have switched
>  their hashtable implementation to SipHash.

Try it out. Mind that we are doing quite few more hash operations than
other languages. I doubt barely anybody here has the maths background to
predict impact on hash calculation performance and conflict ratio and
even then only a test and analysis of different benchmarks will tell the
truth.

johannes
