Skip to content

Instantly share code, notes, and snippets.

View exyi's full-sized avatar

Standa Lukeš exyi

View GitHub Profile
@exyi
exyi / Membench.jl
Created August 13, 2023 11:39
Memory latency and bogotroughput benchmark
using BenchmarkTools
import Optim
function generate_permutation(size::Int)
arr = collect(UInt32(1):UInt32(size))
for i in size:-1:2
j = rand(1:(i-1))
arr[i], arr[j] = arr[j], arr[i]
end