List Info

Thread: "ocaml_beginners"::[] reading line (imperatively) from file more elegantly?




"ocaml_beginners"::[] reading line (imperatively) from file more elegantly?
user name
2006-06-14 07:47:48
On Wednesday 14 June 2006 01:52, George Baah wrote:
> Does writing this code imperatively have negative
impact on efficiency as
> opposed to writing it functionally?

Performance will be dominated by that of the input_line
function, so 
imperative vs functional won't make much difference. In
other cases it can 
make a difference, particularly with floating point
calculations where floats 
are not aggressively unboxed over function calls so it can
be faster to use 
references and loops.

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scient
ists


------------------------ Yahoo! Groups Sponsor
--------------------~--> 
Everything you need is one click away.  Make Yahoo! your
home page now.
http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/saFolB/TM

------------------------------------------------------------
--------~-> 

Archives up to August 22, 2005 are also downloadable at http://www.connettivo.net/cntprojects/ocaml_beginners/
The archives of the very official ocaml list (the seniors'
one) can be found at http://caml.inria.fr
Attachments are banned and you're asked to be polite, avoid
flames etc. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http:/
/groups.yahoo.com/group/ocaml_beginners/

<*> To unsubscribe from this group, send an email to:
    ocaml_beginners-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )