Original Subject: wishlist: numbers egg (random) support
At Wed, 28 Sep 2005 20:09:03 +0200,
felix winkelmann wrote:
>
> That shouldn't be too hard - GMP provides all the neccessary
> things. I'll give it a try.
It would be nice to have. Are there any other procedures
that are not supported by
You could use fx+ if you're guaranteed to be operating on fixnums.
(You probably knew this already though)
On 9/29/05, Daishi Kato <[EMAIL PROTECTED]> wrote:
> Original Subject: wishlist: numbers egg (random) support
>
> At Wed, 28 Sep 2005 20:09:03 +0200,
> felix winkelmann wrote:
> >
> > That s
On 9/29/05, Daishi Kato <[EMAIL PROTECTED]> wrote:
>
> It would be nice to have. Are there any other procedures
> that are not supported by numbers egg?
All arithmetic operations should work with the extended number
types. Operations that involve indices (vector-ref, etc...) still
want fixnums, b
At Mon, 3 Oct 2005 20:40:00 +0200,
felix winkelmann wrote:
> Using numbers is definitely slower, since there is more dispatching
> overhead on number types. The base system only has two numeric
> types, which makes a type-check quite fast. The numbers egg has
> to check for more possible types (and
At Thu, 06 Oct 2005 14:50:18 +0900, Daishi Kato wrote:
>
> That is certainly understandable, except that I do not know if
> type-checking in scheme code is really slower than type-cheking
> in c code, if the scheme code is compiled properly or unsafely. (or inlined?)
> # Basically, there should no
At Thu, 06 Oct 2005 14:50:18 +0900,
Daishi Kato wrote:
> I also tried to compare with fx+. How would you explain this?
Oops, my fault... It was reasonable.
% csi -eval '(define m (expt 2 17))(print (cpu-time))(let loop ([i 0]) (or (> i
m) (loop (+ i 1(print (cpu-time))'
2
64
%
It was too late... Thanks a lot for your examples of measureing.
I will try it a little bit more. --daishi
At Thu, 06 Oct 2005 01:29:08 -0500,
Alex Shinn wrote:
> You have to be careful what you're measuring. Inside the loop you
> repeatedly call expt, which is slower not only because it makes ma
Hi again,
My interest is to get numbers egg fairly efficient
with only fixnum and flonum arithmetic, compare to without the egg.
Thanks to Alex, we know the overhead of (+) is not that bad.
(It might be possible to improve it, though.)
(expt) however is slow for fixnum arithmetic.
I reviewed the "
At Thu, 06 Oct 2005 21:56:08 +0900, Daishi Kato wrote:
>
> (expt) however is slow for fixnum arithmetic.
> I reviewed the "Bug in the numbers egg" thread again,
> understand the background, and am seeking the solution.
It would be nice to have a faster EXPT, but since there have already
been a nu
At Fri, 07 Oct 2005 01:15:57 -0500,
Alex Shinn wrote:
>
> At Thu, 06 Oct 2005 21:56:08 +0900, Daishi Kato wrote:
> >
> > (expt) however is slow for fixnum arithmetic.
> > I reviewed the "Bug in the numbers egg" thread again,
> > understand the background, and am seeking the solution.
>
> It woul
At Wed, 12 Oct 2005 14:35:29 +0900,
Daishi Kato wrote:
> > It's probably better to check the result of %FIX-EXPT once before
> > entering the loop rather than on every iteration, since if it fails
> > once it will always fail.
>
> I see what you mean, but my original thought was
> to even speed up
At Wed, 12 Oct 2005 18:16:12 +0900, Daishi Kato wrote:
>
> Attached my patch proposal.
> How would you think?
This looks good. I'm attaching an initial test suite, which right now
just tests some EXPT cases for fixnums, flonums and bignums. It needs
to be extended to include rationals and compl
12 matches
Mail list logo