1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

math.big: reduce memory usage of Integer.str() (free intermediary Integers), optimise some operations using [direct_array_access] (#14353)

This commit is contained in:
Delyan Angelov
2022-05-13 08:21:34 +03:00
committed by GitHub
parent 3c95504a35
commit ed12a5c84c
6 changed files with 186 additions and 98 deletions

View File

@ -4,13 +4,16 @@ pub const (
zero_int = Integer{
digits: []u32{len: 0}
signum: 0
is_const: true
}
one_int = Integer{
digits: [u32(1)]
signum: 1
is_const: true
}
two_int = Integer{
digits: [u32(2)]
signum: 1
is_const: true
}
)