On 01/20/2012 08:58 AM, oliver wrote:
On Fri, Jan 20, 2012 at 08:29:09AM -0500, Edgar Friendly wrote:
[...]
if a then if b then [a;b] else [a]
else if b then [b] else []
[...]

For me, the original pattern matching code looks much easier to read.

I agree - this was not meant to be a suggestion on how to make the original code easy to read, but instead to point out that it's as efficient as this ugly "optimized" code. I included it in my benchmark as well for only this reason, to verify that the original code was as efficient as it.

E.



--
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to