swarm-modeling
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: matlab & simulink


From: Benedikt Stefansson
Subject: Re: matlab & simulink
Date: Wed, 19 Jan 2000 11:12:49 -0700

Paul Fernandez wrote:

> The first thing is that although MatLab is a powerful tool, its power comes
> from the fact that it is capable of multiplying matrices at the highest
speed,
> so unless you can rethink every simulation in terms of matrices, it will be
> VERY slow, and when I say VERY, it means hundreds of times slower than a
pure C
> program, not far from a Objective-C one. So this is the first drawback.

Just so that people don't get the wrong idea, Objective-C is somewhat slower
than C, but not an order of magnitude slower. The main performance hit is from
message passing and method look-up. The advantage of writing in a nice OO
language far outweigh performance issues in this case.

Paul Johnson wrote:

> I wrote a program in Mathematica and it took about 30 hours to run.  I
> wrote it in C and it took 38 minutes.

This seems to be the experience of other people also. However, while
performance is important, we can never win this argument on that basis.  The
important issue is the appropriateness of the tool.

Look at the programs in Gaylord et ali's  book, they are filled with endless
matrix look-ups, because the authors are trying to graft the ABM paradigm on
top of a procedural language. The outcome is not easy to understand,
generalize or maintain.

The book is not good in my opinion, by the way, it is as if the model makers
didn't care to read up on any of the Econ/PoliSci literature that has gone
before them and therefore the models look like they were just pulled out of a
hat.

Benedikt

--
Benedikt Stefansson      | address@hidden
CASA, Inc.               | Ph : (505) 988-8807 x101
Santa Fe, NM 87501       | Fax: (505) 988-3440





                  ==================================
   Swarm-Modelling is for discussion of Simulation and Modelling techniques
   esp. using Swarm.  For list administration needs (esp. [un]subscribing),
   please send a message to <address@hidden> with "help" in the
   body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]