SPUG: Does Perl Scale? (Was: Evolution of Perl)

Scott Blachowicz scott at sabmail.rresearch.com
Tue Aug 14 20:21:12 CDT 2001

On Tue, Aug 14, 2001 at 02:28:32AM +0000, MichaelRUnningWolf at att.net wrote:
> My personal-best is a 10X improvement within the first 2
> hours on a new job (good karma points).  [[I rewrote
> back-ticks in a shell script, eliminating *lots* of
> fork/exec.]]

Let's see here...is this a contest? :))

Mine is looking at some FORTRAN code that figured out which items in a
network of connected nodes were connected to each other.  The original
code iterated through the nodes and for each node, iterated through
all of the other nodes looking for ones that are connected to that
node.  It took something on the order of 17-20 hours to run (on HP/1000
RTE systems).  I got it down to about 10 minutes by using a little
extra memory to do a 2 pass sweep through all the nodes - pass 1 to
iterate through each node and cache which nodes it is connected to.
Pass 2 to go through each node and dump out its connections.

So...thinking about the algorithms and tradeoffs a bit (and changing
the number of iterations from (n ** n) to (n * 2)) kinda helps...


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
  Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/

More information about the spug-list mailing list