mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 22:58:46 +00:00
[math/big] Tell Python test runner how many nails we use.
`_DIGIT_NAILS` is defined as 4, meaning that we use 60 out of every 64 bits. We can use as few as 1 nail, using 63 bits out of every 64, and all tests will still pass. However, it needs more testing to see if that's a worthwhile change to make. For the tests to work properly when changing the nails, Python needs to know about it as well. In addition, compile the big math code with `-o:speed` going forward.
This commit is contained in:
@@ -32,9 +32,9 @@ print_to_buffer :: proc(val: ^big.Int) -> cstring {
|
||||
|
||||
@export test_initialize_constants :: proc "c" () -> (res: u64) {
|
||||
context = runtime.default_context()
|
||||
res = u64(big.initialize_constants())
|
||||
//assert(MUL_KARATSUBA_CUTOFF >= 40);
|
||||
return res
|
||||
_ = big.initialize_constants()
|
||||
|
||||
return u64(big._DIGIT_NAILS)
|
||||
}
|
||||
|
||||
@export test_error_string :: proc "c" (err: big.Error) -> (res: cstring) {
|
||||
|
||||
Reference in New Issue
Block a user