Issue 21 in ocaml-extlib: Array.exists is slower than List.exists

4 views
Skip to first unread message

codesite...@google.com

unread,
Aug 5, 2011, 11:02:12 AM8/5/11
to ocaml-extlib-...@googlegroups.com
Status: Accepted
Owner: ygrekher...@gmail.com
Labels: Type-Enhancement Milestone-Release1.6 Performance

New issue 21 by ygrekher...@gmail.com: Array.exists is slower than
List.exists
http://code.google.com/p/ocaml-extlib/issues/detail?id=21

Allocates too much (ocamlopt problem?), the implementation below is
noticeably faster :

let array_exists p xs =
try
for i = 0 to Array.length xs - 1 do
if p xs.(i) then raise Exit
done; false
with Exit -> true


codesite...@google.com

unread,
Nov 12, 2013, 12:01:44 PM11/12/13
to ocaml-extlib-...@googlegroups.com
Updates:
Status: Fixed

Comment #1 on issue 21 by ygrekheretix: Array.exists is slower than
List.exists
http://code.google.com/p/ocaml-extlib/issues/detail?id=21

This issue was closed by revision r425.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages