Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

72
Visualizações
JS, implement Map with optimized data layout

I'm writing a voxel octree engine whose memory is very intensive.

There will be enormous of indexes data on those octree nodes while I planning to use map data structure on those indexes.

However, Since I know my map key and value could be fit in 4 bytes per pair while if I use a built-in Map it will consume at least 16 bytes per pair, Since the number is 8 bytes each.

Any ideas or library on Map with memory-intensive in mind?


Update: Another idea I could go with..

I could possibly use the sorted array instead of a map.

And manage the array using ArrayBuffer instead of vanilla js array;

So I could access the element in O(log N) but will be able to granularity control the data layout.


Will leave the topic open cause it seems useful if anyone encountered this situation.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda