Optimizing JS Config Objects with BigInts: An Experiment

2025-09-25
Optimizing JS Config Objects with BigInts: An Experiment

To optimize serialization, comparison, and update operations on a large number of configuration objects, the author experimented with using JavaScript's BigInt type to store configuration data. By packing multiple configuration fields into a single BigInt and using bitwise operations for efficient read and write operations, the author achieved a compact memory representation and fast serialization/deserialization. However, this approach also has some drawbacks, such as the need to manually manage field bit widths and offsets, and the performance issues of BigInt bitwise operations. The author is currently still evaluating the practical effect of this method and plans to update the article in the future.

Read more
Development

Switching from Cloudflare to BunnyCDN: A Smooth Transition

2025-03-15
Switching from Cloudflare to BunnyCDN: A Smooth Transition

Concerned about recent US political instability, I migrated my website from Cloudflare to the European CDN alternative, BunnyCDN. The entire process was surprisingly easy and took less than two hours. I created storage and pull zones, and switched my domain DNS to point to BunnyCDN. I encountered a few minor hurdles, like HTTPS certificates and automated deployments, but overall, BunnyCDN is faster, has a cleaner UI, and is cheaper. It's a great option, though not quite as one-click convenient as Cloudflare Pages.

Read more
Development CDN migration