mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1890540 - Avoid redundant computation of iid_bytes during xpt codegen r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D207031
This commit is contained in:
parent
278a64c051
commit
9f8eb326af
@ -9,6 +9,7 @@ import json
|
||||
from collections import OrderedDict
|
||||
|
||||
import buildconfig
|
||||
from mozbuild.util import memoize
|
||||
from perfecthash import PerfectHash
|
||||
|
||||
# Pick a nice power-of-two size for our intermediate PHF tables.
|
||||
@ -135,6 +136,7 @@ def split_iid(iid): # Get the individual components out of an IID string.
|
||||
return tuple(split_at_idxs(iid, (8, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2)))
|
||||
|
||||
|
||||
@memoize
|
||||
def iid_bytes(iid): # Get the byte representation of the IID for hashing.
|
||||
bs = bytearray()
|
||||
for num in split_iid(iid):
|
||||
|
Loading…
Reference in New Issue
Block a user