Get the latest tech news

Optimizing a bignum library for fun


Can I make math operations run 100x faster on really, really big numbers?

There are tradeoffs for how many bits to use per chunk: memory, arithmetic performance, cache locality, overflow management, native CPU operations, complexity of our code, etc. Alright, so we have made two major optimizations to the bignum library and measured the impact on running time. Negative numbers Subtraction and division Exponentiation Bitwise operations Converting to/from other types Tests(I bet there are many bugs in my code)

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Fun

Fun

Photo of bignum library

bignum library

Related news:

News photo

With the latest iOS 18 developer beta, Apple makes flashlight UI more fun

News photo

First PC emulator arrives on iOS App Store, delivers i486 or PowerPC fun on your iPhone, iPad or Vision Pro | Play Doom on your iPhone just like you did on your 486 decades ago.

News photo

Hey Google, what happened to all the fun?