From: ·········@nosuchisp.com
Subject: How to make LispWorks fast
Date: 
Message-ID: <3drpvs0m21mkcf11fb7ioaljnbm21me1rt@4ax.com>
Does anyone know if there are combinations of declarations, declamations,
etc., which can make LispWorks as fast as ACL?  (Just the bottlenecks, of
course.)  In other words, is the best possible optimization of LispWorks
anywhere near as fast as the best possible optimization of ACL?

Or does it make sense to use C with LispWorks, even where it wouldn't make
sense to use the same C with ACL?

From: Kent M Pitman
Subject: Re: How to make LispWorks fast
Date: 
Message-ID: <sfwr94yvlr2.fsf@world.std.com>
·········@nosuchisp.com writes:

> Does anyone know if there are combinations of declarations, declamations,
> etc., which can make LispWorks as fast as ACL?  (Just the bottlenecks, of
> course.)  In other words, is the best possible optimization of LispWorks
> anywhere near as fast as the best possible optimization of ACL?

I think the answer isn't as simple as you make it.  Are you asking who
better optimizes a so-called portable program (as if any program that uses
speed/space declarations, the meanings of them not being specified in the
standard, were really "portable" in intent; they'll probably run, but the
precise meaning is vague)?  Or are you asking whether there are ways of
overcoming this absence.

My recollection is that a long time ago one consultant concluded that LW
with LW-specific declarations could be made much faster than ACL, but some
of those declarations are very odd and a few could be said to pretty much
toss the semantics of CL out the window.  (For example, one says to just 
assume all arithmetic is fixnum.  Which is fine if all arithmetic IS fixnum,
but which is a darned weird declaration to use globally in the absence of
very thorough scrutiny of the code.)

If you limit yourself only to CL-specified declarations, you might find ACL
was better at that same point in time, now long past.

My point here is not to make a statement about implementations now, since these
things change with time and are not meaningful when not associated  with 
specific version numbers.

The truth is that optimization should never be done on a program that is not
just about to go out the door and otherwise very well specified, since you
may find that you otherwise can't do it to your specific needs.  And 
what can be optimized for a given program may have no relation to what can
be optimized generally.  And what it means to optimize may be very different
if you allow implementation-specific tuning tools and declarations to be used 
or if you want everything to work portably.  And so on.

It's honestly apples and oranges.

I think it's fair to say that both LW and ACL are credible
high-quality implementations that can be made adequately fast, and I'd
bet that it's largely not a thing in either case that is going to
stand between you and business success.

> Or does it make sense to use C with LispWorks, even where it wouldn't make
> sense to use the same C with ACL?

I doubt this.

But a lot depends on the answers to more things than you offered in your
premises, so ...

There might be some very specific issue that one or the other implementation
does not optimize and that you have to go to C for.  I doubt if you are on
support and reported it that they wouldn't take your need seriously and try
to help you not have to go to C in some later release.  Both companies 
try to be pretty responsive to customers on paid support, in my experience.
From: ·········@nosuchisp.com
Subject: Re: How to make LispWorks fast
Date: 
Message-ID: <cvkqvskfmq5rpfel9er8e2f6er316otgcu@4ax.com>
On Mon, 30 Oct 2000 07:20:01 GMT, Kent M Pitman <······@world.std.com> wrote:

>My recollection is that a long time ago one consultant concluded that LW
>with LW-specific declarations could be made much faster than ACL, but some
>of those declarations are very odd and a few could be said to pretty much
>toss the semantics of CL out the window.  (For example, one says to just 
>assume all arithmetic is fixnum.  Which is fine if all arithmetic IS fixnum,
>but which is a darned weird declaration to use globally in the absence of
>very thorough scrutiny of the code.)

But couldn't such a declaration be used locally?  I only want to optimize a
few of the worst bottlenecks.  As a hypothetical example just to clarify
this, consider a Lisp program that spends 99% of its time manipulating
pixels, but 99% of its program logic doing more abstract things than that.
My question amounts to comparing the ability of ACL and LispWorks to optimize
that 1% to reduce that 99% time consumption to a small fraction of what it
was, thereby making the overall program many times faster with just a very
small amount of optimization.  It doesn't matter if the declamations etc. are
standard, as long as they're successful.
From: Marc Battyani
Subject: Re: How to make LispWorks fast
Date: 
Message-ID: <8tjnjf$lj7$1@reader1.fr.uu.net>
<·········@nosuchisp.com> wrote in message
·······································@4ax.com...
> On Mon, 30 Oct 2000 07:20:01 GMT, Kent M Pitman <······@world.std.com>
wrote:
>
> >My recollection is that a long time ago one consultant concluded that LW
> >with LW-specific declarations could be made much faster than ACL, but
some
> >of those declarations are very odd and a few could be said to pretty much
> >toss the semantics of CL out the window.  (For example, one says to just
> >assume all arithmetic is fixnum.  Which is fine if all arithmetic IS
fixnum,
> >but which is a darned weird declaration to use globally in the absence of
> >very thorough scrutiny of the code.)
>
> But couldn't such a declaration be used locally?  I only want to optimize
a
> few of the worst bottlenecks.  As a hypothetical example just to clarify
> this, consider a Lisp program that spends 99% of its time manipulating
> pixels, but 99% of its program logic doing more abstract things than that.
> My question amounts to comparing the ability of ACL and LispWorks to
optimize
> that 1% to reduce that 99% time consumption to a small fraction of what it
> was, thereby making the overall program many times faster with just a very
> small amount of optimization.  It doesn't matter if the declamations etc.
are
> standard, as long as they're successful.

If it's a small part of code post it here so that people can help you.

Use "disassemble" to see what is generated and where are the problems if
any.

Marc Battyani
From: Kent M Pitman
Subject: Re: How to make LispWorks fast
Date: 
Message-ID: <sfwog028f40.fsf@world.std.com>
·········@nosuchisp.com writes:

> 
> On Mon, 30 Oct 2000 07:20:01 GMT, Kent M Pitman <······@world.std.com> wrote:
> 
> >My recollection is that a long time ago one consultant concluded that LW
> >with LW-specific declarations could be made much faster than ACL, but some
> >of those declarations are very odd and a few could be said to pretty much
> >toss the semantics of CL out the window.  (For example, one says to just 
> >assume all arithmetic is fixnum.  Which is fine if all arithmetic IS fixnum,
> >but which is a darned weird declaration to use globally in the absence of
> >very thorough scrutiny of the code.)
> 
> But couldn't such a declaration be used locally?  I only want to optimize a
> few of the worst bottlenecks.

Sure.  And used in a macro, it might be very helpful to get past such 
situations.  My point was only that it depends on your taste and needs as 
to whether such things are acceptable; if they are, then you probably have
an answer to your need. 
From: Lieven Marchand
Subject: Re: How to make LispWorks fast
Date: 
Message-ID: <m3y9z6xmkn.fsf@localhost.localdomain>
·········@nosuchisp.com writes:

> Does anyone know if there are combinations of declarations, declamations,
> etc., which can make LispWorks as fast as ACL?  (Just the bottlenecks, of
> course.)  In other words, is the best possible optimization of LispWorks
> anywhere near as fast as the best possible optimization of ACL?
> 
> Or does it make sense to use C with LispWorks, even where it wouldn't make
> sense to use the same C with ACL?
> 

Could you post an example of where LispWorks is too slow for you? I've
used both and I've never found examples of places where one was
unreasonably slower than the other.

-- 
Lieven Marchand <···@bewoner.dma.be>
Lambda calculus - Call us a mad club