From: David Newman
Subject: LUCID bitvector operations??
Date: 
Message-ID: <3070@cantor.ACA.MCC.COM>
All,

	I'm having a problem with porting some code from Genera 8.0.1 to
Lucid 4.0. If anyone can help me out, I would apprecciate it.

	I have two algorithims that perform graph unification.  Call
them "old" and "new."  On the Symbolics, these two algorithims have
approximately the same performance except that "new" conses
significantly less than "old."  The main difference between these two
algorithims is that "new" uses bitvectors, while "old" is mostly
list-based.

	When I move these algorithims to a Sun4 running Lucid 4.0, the
relative performance of the two algorithims changes.  The "old"
algorithim has slightly better performance than it did on the Symbolics,
but the "new" algorithim is about 5x slower than "old."  I believe that
the relative amount of consing remains basically the same.

	I suspected that the logical operations I was using on
bitvectors were at fault, and so I tried to test this hypothesis.  I
tested the relative speed of the bitvector logical operations on the two
machines, and found that Lucid appeared to be significantly faster.
This seemed to disprove my initial hypothesis, so I ran the respective
profiling utilities for Genera and Lucid on the "new" algorithim.  It
showed that on the Symbolics, the bitvector logical operations were
responsible for about 5% of the total time required, while these same
functions used about 60% of the total time required on the Sun.  This
seemed to show that my initial hypothesis was correct.  Thus, I have
seemingly contradictory results.

	This  is the crux of my problem.  I can't decide
conclusively whether or not the speed of the bitvector logical
operations is responsible for the poor performance of the "new"
algorithim on the Sun4.  If you can make any suggestions on how to prove
this either way, or if you can provide information about Lucid's
implementation that would support either hypothesis, I would like to
see it.

Thanks,

>>Dave
From: Barry Margolin
Subject: Re: LUCID bitvector operations??
Date: 
Message-ID: <1991Jun27.064742.23624@Think.COM>
In article <····@cantor.ACA.MCC.COM> ·······@radar.UUCP (David Vincent Newman) writes:
>	This  is the crux of my problem.  I can't decide
>conclusively whether or not the speed of the bitvector logical
>operations is responsible for the poor performance of the "new"
>algorithim on the Sun4.  

I suspect your initial hypothesis, that the bitvector operations are the
bottleneck, was correct.

One reason you may not have seen the bottleneck when you ran a separate
test of bitvector operations is that the problem may relate to interactions
with memory management.  In the real algorithm, enough other stuff could be
taking place that EGCs are copying these bitvectors around alot, while
there might not be many EGCs in the simplified test.
-- 
Barry Margolin, Thinking Machines Corp.

······@think.com
{uunet,harvard}!think!barmar