optimize more functions

master
Damien Doligez 2019-04-08 11:47:43 +02:00
parent c7c44e13b0
commit ee1c8b4082
1 changed files with 2 additions and 2 deletions

View File

@ -279,7 +279,7 @@ let to_seq b =
let rec aux i () =
if i >= b.position then Seq.Nil
else
let x = Bytes.get b.buffer i in
let x = Bytes.unsafe_get b.buffer i in
Seq.Cons (x, aux (i+1))
in
aux 0
@ -288,7 +288,7 @@ let to_seqi b =
let rec aux i () =
if i >= b.position then Seq.Nil
else
let x = Bytes.get b.buffer i in
let x = Bytes.unsafe_get b.buffer i in
Seq.Cons ((i,x), aux (i+1))
in
aux 0