Bug 18921 – make core.internal.hash cater to memberwise hash chaining

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-05-30T21:40:44Z
Last change time
2018-07-03T05:27:08Z
Assigned to
No Owner
Creator
Nathan S.

Comments

Comment #0 by n8sh.secondary — 2018-05-30T21:40:44Z
For use in memberwise hashing of structs (as in issue #18918) or in hashing arrays, speed up the hashing of individual scalars. Right now, for a `struct` where each field is `uint`, memberwise chained hashing has a 250% speed penalty with LDC2 and a 350% speed penalty on DMD2 compared to treating the struct as an array of bytes. This seems fairly constant regardless of the size of the struct.
Comment #1 by n8sh.secondary — 2018-05-30T21:44:52Z
Comment #2 by github-bugzilla — 2018-07-03T05:27:07Z
Commits pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/ea2a844863bb00d7e9313f51ae19f6a31aa555e6 Fix Issue 18921 - make core.internal.hash cater to memberwise hash chaining https://github.com/dlang/druntime/commit/ba4c59799eeebc969ced95de34cd4203c8ec2254 Merge pull request #2198 from n8sh/core-hash-18921 Fix Issue 18921 - make core.internal.hash cater to memberwise hash chaining