mirror of
https://github.com/status-im/nim-stint.git
synced 2025-02-19 18:38:13 +00:00
500% division speed increase with bigint twice the size
This commit is contained in:
parent
24bd2fc986
commit
4e12596295
@ -18,10 +18,10 @@ echo "Warmup: " & $(stop - start) & "s"
|
||||
|
||||
start = cpuTime()
|
||||
block:
|
||||
var foo = 123.initMpUint(64)
|
||||
var foo = 123.initMpUint(128)
|
||||
for i in 0 ..< 10_000_000:
|
||||
foo += i.initMpUint(64) * i.initMpUint(64) mod 456.initMpUint(64)
|
||||
foo = foo mod 789.initMpUint(64)
|
||||
foo += i.initMpUint(128) * i.initMpUint(128) mod 456.initMpUint(128)
|
||||
foo = foo mod 789.initMpUint(128)
|
||||
|
||||
stop = cpuTime()
|
||||
echo "Library: " & $(stop - start) & "s"
|
||||
|
Loading…
x
Reference in New Issue
Block a user