Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
Ğ Groups Home
Q: LispWorks speed issue
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 26 - 32 of 32 - Collapse all  -  Translate all to Translated (View all originals) < Older 
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Thomas A. Russ  
View profile  
 More options Mar 13 2002, 3:37 am
Newsgroups: comp.lang.lisp
From: t...@sevak.isi.edu (Thomas A. Russ)
Date: 12 Mar 2002 15:14:45 -0800
Local: Tues, Mar 12 2002 6:14 pm
Subject: Re: Q: LispWorks speed issue

"Ladvánszky Károly" <a...@bb.cc> writes:

> There is something I have not paid much attention to.
> In the test, TIME says:

> Allocation   = 1465806248 bytes standard / 19965 bytes fixlen

> Allocation must be the cause of the long execution time! Why does this
> do-nothing test allocate that much?

It is related to the fixnum/bignum issue.  Creating bignums allocates
storage, unlike fixnums, which are often implemented as immediate
(integer) datatypes using machine integers.

--
Thomas A. Russ,  USC/Information Sciences Institute          t...@isi.edu    


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Q: (LispWorks) speed issue" by Nicolas Neuss
Nicolas Neuss  
View profile  
 More options Mar 13 2002, 5:45 am
Newsgroups: comp.lang.lisp
From: Nicolas Neuss <Nicolas.Ne...@iwr.uni-heidelberg.de>
Date: 13 Mar 2002 11:36:14 +0100
Local: Wed, Mar 13 2002 5:36 am
Subject: Re: Q: (LispWorks) speed issue

"Ladvánszky Károly" <a...@bb.cc> writes:
> Thank you for your answer, it has been most helpful for me. You are right,
> most-positive-fixnum is rather small on LW and it is above my 10e8 test
> count on CormanLisp. That has caused the significant difference in test
> results.
> Your simple solution to use nested loops is fine, it runs within 2 secs on
> my machine.

An even simpler possibility is to use floating point operations for
semi-long integers.  Try the following:

(defun tt (nn)
  (declare (optimize (speed 3) (safety 0)))
  (loop for k of-type double-float below (float nn 1.0d0) do
        nil))

(time (tt 100000000))

Yours, Nicolas.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Naggum  
View profile  
 More options Mar 13 2002, 1:12 pm
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.net>
Date: Wed, 13 Mar 2002 18:12:42 GMT
Local: Wed, Mar 13 2002 1:12 pm
Subject: Re: Q: (LispWorks) speed issue
* Nicolas Neuss
| An even simpler possibility is to use floating point operations for
| semi-long integers.  Try the following:
|
| (defun tt (nn)
|   (declare (optimize (speed 3) (safety 0)))
|   (loop for k of-type double-float below (float nn 1.0d0) do
|       nil))
|
| (time (tt 100000000))

  Very good advice, only make sure that k and (1- k) are different, i.e.,
  that you use fewer bits than the precision of the floating point format.
  (float-precision 1d0) returns that number.

  Of course, this works best when double-floats are not passed around,
  otherwise, they need to be boxed and cons like mad.  It _should_ have
  been equally efficient with bignums, methinks.  Oh, well.

///
--
  In a fight against something, the fight has value, victory has none.
  In a fight for something, the fight is a loss, victory merely relief.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Q: LispWorks speed issue" by Marco Antoniotti
Marco Antoniotti  
View profile  
 More options Mar 26 2002, 10:40 am
Newsgroups: comp.lang.lisp
From: Marco Antoniotti <marc...@cs.nyu.edu>
Date: 26 Mar 2002 10:40:30 -0500
Local: Tues, Mar 26 2002 10:40 am
Subject: Re: Q: LispWorks speed issue

Cormanlisp compiles everything by default.  LW does not.

Try

        cl-prompt> (defun tt (nn) (dotimes (n nn) nil))
        TT

        cl-prompt> (compile 'tt)
        TT
        NIL
        NIL

        cl-prompt> (time (tt 100000000))

Cheers

--
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group        tel. +1 - 212 - 998 3488
719 Broadway 12th Floor                 fax  +1 - 212 - 995 4122
New York, NY 10003, USA                 http://bioinformatics.cat.nyu.edu
                    "Hello New York! We'll do what we can!"
                           Bill Murray in `Ghostbusters'.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Barry Wilkes  
View profile  
 More options Mar 26 2002, 11:21 am
Newsgroups: comp.lang.lisp
From: Barry Wilkes <wilk...@acm.org>
Date: 26 Mar 2002 16:21:04 +0000
Local: Tues, Mar 26 2002 11:21 am
Subject: Re: Q: LispWorks speed issue

The other thing to note is that 100000000 is well into bignum territory on
LispWorks (this is on 4.2 for Linux):

CL-USER 254 > most-positive-fixnum
8388607

Using bignums causes a *huge* slowdown - for a fairer comparison I suggest you
try :

a) compiling the function as Marco suggests

b) ensure that your looping variable stays within the
   fixnum limits for LispWorks - so (eg) do something like:

CL-USER 255 > (time (dotimes (n 100) (tt 1000000)))

Barry.

--
If in the last few years you haven't discarded a major opinion or  
acquired a new one, check your pulse.  You may be dead.

-- Gelett Burgess (1866-1951)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Geoff Summerhayes  
View profile  
 More options Mar 26 2002, 11:43 am
Newsgroups: comp.lang.lisp
From: "Geoff Summerhayes" <sNuOmSrPnA...@hNoOtSmPaAiMl.com>
Date: Tue, 26 Mar 2002 16:43:03 GMT
Local: Tues, Mar 26 2002 11:43 am
Subject: Re: Q: LispWorks speed issue

"Marco Antoniotti" <marc...@cs.nyu.edu> wrote in message

news:y6cofhbwd5d.fsf@octagon.mrl.nyu.edu...

> > I would appreciate any help on how to speed up things.

> Cormanlisp compiles everything by default.  LW does not.

Marco,

You should have gone to Google and read the rest of the thread.
It was fixnum sizes that made the time difference.

Geoff


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marco Antoniotti  
View profile  
 More options Mar 26 2002, 2:21 pm
Newsgroups: comp.lang.lisp
From: Marco Antoniotti <marc...@cs.nyu.edu>
Date: 26 Mar 2002 14:21:34 -0500
Local: Tues, Mar 26 2002 2:21 pm
Subject: Re: Q: LispWorks speed issue

"Geoff Summerhayes" <sNuOmSrPnA...@hNoOtSmPaAiMl.com> writes:
> "Marco Antoniotti" <marc...@cs.nyu.edu> wrote in message
> news:y6cofhbwd5d.fsf@octagon.mrl.nyu.edu...

> > > I would appreciate any help on how to speed up things.

> > Cormanlisp compiles everything by default.  LW does not.

> Marco,

> You should have gone to Google and read the rest of the thread.
> It was fixnum sizes that made the time difference.

Sorry. I think this is a problem with my newsserver.  I noticed that I
get repeated articles and threads after a week or so.  So the article
appeared as "unread".

Who knows what's happening.

Cheers

--
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group        tel. +1 - 212 - 998 3488
719 Broadway 12th Floor                 fax  +1 - 212 - 995 4122
New York, NY 10003, USA                 http://bioinformatics.cat.nyu.edu
                    "Hello New York! We'll do what we can!"
                           Bill Murray in `Ghostbusters'.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages < Older 
« Back to Discussions « Newer topic     Older topic »