Message from JavaScript discussions

June 2017

— Oh?

— 

allocatedArray = [];
fill(allocatedArray);

class Set {
constructor() {
this.data = Object.assign([], allocatedArray);
}
}

— Something like that?

— So every set re-uses the single pre-allocated master array

— And reassigns indexes which get filled?

— That is effectively the same thing

— Oh

— Lets have some scenario... lets say we went with nested precision char codes. We have to not only account for strings shorter than the precision setting, but also equal or higher...

Message permanent page

— You're right

— Ugh..

— Hmm

— Imagine all of these are 65535-length arrays except for the last one, with each of those numbers being both an index and the char code (same thing). This is for string "ALOHA"

_list = [

  65: [

    76: [

      79: [

        72: [

          65: [

            5: [ "ALOHA" ]

          ]

        ]

      ]

    ]

  ]

]

Message permanent page