Skip to content

Commit

Permalink
Use unsafe_set for more performance
Browse files Browse the repository at this point in the history
The bounds are already checked at a higher level, so an extra bounds
check is unnecessary overhead.
  • Loading branch information
wlitwin committed Sep 1, 2021
1 parent ce67cbf commit 1c80b9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion renderers/gles2/native/stubs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ module Buffer = struct
arr

let get : t -> int -> float = Bigarray.Array1.unsafe_get
let set : t -> int -> float -> unit = Bigarray.Array1.set
let set : t -> int -> float -> unit = Bigarray.Array1.unsafe_set
let length : t -> int = Bigarray.Array1.dim
let fill : t -> float -> unit = Bigarray.Array1.fill
let blit ~(src : t) ~(s_off : int) ~(dst : t) ~(d_off : int) ~(len : int) : unit =
Expand Down

0 comments on commit 1c80b9a

Please sign in to comment.