News for hackers. Stuff that matters.
Re:Adding BigInts to V8 by mratsim on Thursday May 03, 2018 @04:47AM (#16984327)
I would be very interested in the test suite you used.

I've finished my own bigint implementation in the Nim language:

- stack and power-of-2 only for uint256, uint512, uint1024, etc),

- using recursive types (uint128 = 2x uint64, uint256 = 2x uint128).

It is already quite optimized (division using Burnikel and Ziegler recursive division for example), but I want to make sure it works fine.

https://github.com/status-im/nim-stint

Re:Adding BigInts to V8 by judofyr on Thursday May 03, 2018 @04:54AM (#16984368)
Interesting approach. If I understand your library correctly, you need to choose a bitsize at compile-time? I thought you often wanted unlimited precision (aka. possibly heap-allocated) when using bigints?
Re:Adding BigInts to V8 by mratsim on Thursday May 03, 2018 @11:41AM (#16986962)
Indeed, in my case I didn't need arbitrary precision, just extending uint64 to uint128, uint256, uint512, ... Fixed size are perfectly fine for a variety of use cases, can be stack-allocated and are much faster due to the specialization.