authorgravatar for datamanrb@gmail.comdata-man <datamanrb@gmail.com> 2020-05-06 17:08:49+05:00
committergravatar for datamanrb@gmail.comdata-man <datamanrb@gmail.com> 2020-05-06 17:08:49+05:00
log3c4abacba67830f368f0d22de796a9b531044a15
tree6fa1538d7affbfcafbbbdec5e63a604b24c7d959
parent0e30edd8d099f005e3d1ee4de1d130c6e5c69295

Optimization of vectors hashing


1 files changed, 1 insertions(+), 3 deletions(-)

lib/std/hash/auto_hash.zig+1-3
......@@ -113,11 +113,9 @@ pub fn hash(hasher: var, key: var, comptime strat: HashStrategy) void {
113113 hasher.update(mem.asBytes(&key));
114114 } else {
115115 // Otherwise, hash every element.
116 // TODO remove the copy to an array once field access is done.
117 const array: [info.len]info.child = key;
118116 comptime var i = 0;
119117 inline while (i < info.len) : (i += 1) {
120 hash(hasher, array[i], strat);
118 hash(hasher, key[i], strat);
121119 }
122120 }
123121 },