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