|
[Date Index]
[Thread Index]
[Author Index]
Re: Re: Assignment problem
- To: mathgroup at smc.vnet.net
- Subject: [mg86353] Re: [mg86319] Re: Assignment problem
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Sun, 9 Mar 2008 05:02:12 -0500 (EST)
- References: <fqo8o1$suo$1@smc.vnet.net> <fqqs3b$kf5$1@smc.vnet.net> <200803081042.FAA13433@smc.vnet.net>
On 8 Mar 2008, at 11:42, Helen Read wrote:
> Albert Retey wrote:
>>
>> Note that usually using a Do-Loop is the better choice in
>> Mathematica:
>
> (as compared with a For loop).
>
> This is the second post I've seen today that says that Do loops are
> better than For loops in Mathematica. What is better about them (aside
> from slightly simpler syntax)?
>
> --
> Helen Read
> University of Vermont
>
They are usually visibly faster (at numerical rather than symbolic
computations), although the Do loop is usually still slower than
functional iterators like Nest, Fold etc. The differences tend to
disappear if Compile is used, but doing that succesfully is not always
easy or even possible.
Andrzej Kozlowski
Prev by Date:
Re: ListCorrelate and functions on it with an extra
Next by Date:
Re: ListCorrelate and functions on it with an extra condition
Previous by thread:
Re: Assignment problem
Next by thread:
Re: Assignment problem
|