Skip to content

Commit

Permalink
remove reverse of bit constructions for 3x speed
Browse files Browse the repository at this point in the history
  • Loading branch information
jbytecode committed Sep 29, 2023
1 parent 85f9d62 commit 07606db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/algorithms/MCCGA/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Optimizasyon Yöntemi", TR Patent 2018-GE-510,239
function bits(f::T)::Array{Int8,1} where {T<:Number}
newf = Float32(f)
casted = reinterpret(Int32, newf)
return reverse(map(i-> casted >> i & 1, 0:31))
return map(i-> casted >> i & 1, 31:(-1):0)
end

"""
Expand Down

0 comments on commit 07606db

Please sign in to comment.