Browse thread
[Caml-list] OCaml Speed for Block Convolutions
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | William Chesters <williamc@p...> |
| Subject: | Re: [Caml-list] OCaml Speed for Block Convolutions |
Charles Martin writes: > > >> > a := !a +. Array.unsafe_get xs i > >> a <- a +. Array.unsafe_get xs i > > At the risk of being off topic, I am wondering why most every code > scrap that appears on this list uses > [Array|String].unsafe_[get|set], rather than the "safe" versions. > Are off-by-one errors and the like so rare? Doesn't adding > "-unsafe" as a compiler option to your final build have the same > effect? If not, that would be worth knowing. it's just that when one posts performance-related snippets, it saves everyone's time if it's immediately clear that bounds checks are not an issue ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr