[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Execution speed of current snapshot vs. official 2.1.1
From: |
Paul Johnson |
Subject: |
Re: Execution speed of current snapshot vs. official 2.1.1 |
Date: |
Mon, 15 Apr 2002 20:23:27 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020326 |
M Lang / S Railsback wrote:
Marcus: I remember you doing some work to speed up Swarm.
I am running our fish model using the official release of 2.1.1, dated
Oct. 2000. The model spends most of its time in our Objective C code,
and we did speed it up about 20% by eliminating unnecessary calls to
time-consuming functions like EXP() and POW(). However, we do a lot of
messageProbe calls too.
Yes, there are some speedups I'm sure of. About 6 or 8 months ago I
goosed Swarm's use of random numbers, and some programs I ran got 25%
faster. On average, I think Marcus saw about a 12% improvement.
I did not realize exp() and pow() are bad. I notice really big
performance improvements from getting rid of modulus operators in my
code. I can make Obj-C heatbugs run about 1/3 faster by fiddling the
space so it does not use % so much. In case you ever want to see, please
drop this new one in and measure:
http://lark.cc.ukans.edu/~pauljohn/Swarm/MySwarmCode/HeatSpace.m
One speedup I have obtained recently is in avoiding slow usages of Swarm
List objects. If you use atOffset:, it starts at the beginning and
counts through until it finds what it wants. doing a for loop with
atOffset: in it is humongously slow.
When atOffset is unavoidable, I find converting to Swarm Arrays makes a
pretty big difference, especially in randomly permuted lists or in
randomized action groups. It makes such a big difference because the
Shuffler uses atOffset a lot in grabbing elements from the list.
Let me know what you think about the new swarm pretest. I get good
performance, especially from Java apps the speedup is quite dazzling.
--
Paul E. Johnson email: address@hidden
Dept. of Political Science http://lark.cc.ku.edu/~pauljohn
University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66045 FAX: (785) 864-5700
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
Re: Execution speed of current snapshot vs. official 2.1.1, Marcus G. Daniels, 2002/04/16