From a0e7a46be4d468ecf61b0e6cd7c81f11ddbd4233 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 10 Apr 2022 13:07:35 +0300 Subject: [PATCH] rand: speed up MT19937RNG.u64 --- vlib/rand/mt19937/mt19937.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/rand/mt19937/mt19937.v b/vlib/rand/mt19937/mt19937.v index 287d8e0de8..3bdfcb1468 100644 --- a/vlib/rand/mt19937/mt19937.v +++ b/vlib/rand/mt19937/mt19937.v @@ -147,7 +147,7 @@ pub fn (mut rng MT19937RNG) u32() u32 { const mag01 = [u64(0), u64(matrix_a)] // u64 returns a pseudorandom 64bit int in range `[0, 2⁶⁴)`. -[inline] +[direct_array_access; inline] pub fn (mut rng MT19937RNG) u64() u64 { mut x := u64(0) mut i := int(0)