Get the latest tech news

Storing Unwise Amounts of Data in JavaScript Bigints


Storing Unwise Amounts of Data in JavaScript Bigints This is a short note to document storing data in JS’s bigint type. I tried this out in a project recently, and it’s not obviously a terrible idea, as long as you take into account all the caveats that make it only useful for very specific cases. Why This is a performance1 thing. In the project where I was exploring this, we had a large amount of objects representing configuration values. The possible configuration keys were the same, but different objects had different keys set. This approach was causing some issues:

ContentsContentsThis is a short note to document storing data in JS’s bigint type. I tried this out in a project recently, and it’s not obviously a terrible idea, as long as you take into account all the caveats that make it only useful for very specific cases. Expect to write a whole bunch of tests that basic things like getting and setting a property work.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of data

data

Photo of javascript bigints

javascript bigints

Photo of unwise amounts

unwise amounts

Related news:

News photo

US border patrol collected DNA from thousands of US citizens for years, data shows

News photo

Neon Pays Users To Record Their Phone Calls, Sell Data To AI Firms

News photo

Fossil Fuel Burning Poses Threat To Health of 1.6 Billion People, Data Shows