Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

70
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!