mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
builtin: reduce the number of array allocations for consts in all V programs (#18889)
This commit is contained in:
parent
44d2f2b302
commit
1ed0cd9a74
12 changed files with 1317 additions and 644 deletions
|
@ -7,11 +7,11 @@ const (
|
|||
// See http://supertech.csail.mit.edu/papers/debruijn.pdf
|
||||
de_bruijn32 = u32(0x077CB531)
|
||||
de_bruijn32tab = [u8(0), 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, 31, 27, 13,
|
||||
23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9]
|
||||
23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9]!
|
||||
de_bruijn64 = u64(0x03f79d71b4ca8b09)
|
||||
de_bruijn64tab = [u8(0), 1, 56, 2, 57, 49, 28, 3, 61, 58, 42, 50, 38, 29, 17, 4, 62, 47, 59,
|
||||
36, 45, 43, 51, 22, 53, 39, 33, 30, 24, 18, 12, 5, 63, 55, 48, 27, 60, 41, 37, 16, 46,
|
||||
35, 44, 21, 52, 32, 23, 11, 54, 26, 40, 15, 34, 20, 31, 10, 25, 14, 19, 9, 13, 8, 7, 6]
|
||||
35, 44, 21, 52, 32, 23, 11, 54, 26, 40, 15, 34, 20, 31, 10, 25, 14, 19, 9, 13, 8, 7, 6]!
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue