— This could be allocated on startup I think
— And then re-used across all set instances
—
allocatedArray = [];
fill(allocatedArray);
class Set {
constructor() {
this.data = Object.assign([], allocatedArray);
}
}
Message permanent page
— So every set re-uses the single pre-allocated master array
— And reassigns indexes which get filled?
— That is effectively the same thing