Open Bug 1848884 Opened 1 year ago Updated 1 year ago

Store scrambled hash values in atoms

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

ASSIGNED

People

(Reporter: sfink, Assigned: sfink)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [sp3])

Attachments

(8 files)

We use the type HashNumber to represent a number of different values. I'll name them

  • raw hashes: directly computed from the input
  • scrambled hashes: passed through a scrambler that spreads out the entropy to make it more uniform
  • prepared hashes: mfbt/HashTable.h reserves the bottom bit for collisions, and zero for a null value.
  • entry hashes: a prepared hash with information in its collision bit.
  • hash index: a hash value, possibly shifted or masked, used to do address computations.

Currently, we store raw hashes in atoms and therefore must re-scramble and re-prepare them before use. We could consider storing prepared hashes instead.

I implemented this, and honestly it didn't really make any difference in performance. We might still decide to land part of this stack purely for the preparatory work, which creates a new mozilla::KeyHash type to distinguish some of the different types of HashNumbers.

My try push did show significant improvements in stylebench on osx but I don't believe them. If I look at the actual data points, some of the subtests really did have results where all of the patched version did better than all of the unpatched, but that looks more like a chance difference between binaries to me.

Assignee: nobody → sphink
Status: NEW → ASSIGNED
Severity: -- → N/A
Priority: -- → P2
Attachment #9349099 - Attachment description: Bug 1848884 - Switch deduplication hash to match atom hasher → Bug 1848884 - Refactor deduplication hash computation.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: