Re: Floats and Doubles

2002-11-13 Thread Jan Kort
Juan Ignacio Garcia Garcia wrote: *P2 (fromRational ((toRational 4) - ( toRational 5.2 ))) -1.2002 I can't explain this one, how would fromRational know that it has to create a Double ? Jan ___ Glasgow-haskell-users mailing list [EMAIL

Re: failed when trying to compile FranTk with ghc

2001-04-09 Thread Jan Kort
luc wrote: I tried FranTk with ghc 4.08 and got : (this is the "fixed" FrankTk, alledged working with 4.06, if im not wrong) are there any difference with 4.06 and 4.08 ? Below is a list of fixes to get FranTk working with ghc4.08. Jan Run configure like normal, i.e.: ./configure

Re: Bagley shootout. Was: Lightningspeed haskell

2001-03-06 Thread Jan Kort
I implemented the programs for hash1 and hash2, but I had to make a lot of changes to FiniteMap to get them to work: - I changed foldl to foldl' (as defined in Hugs). - I made foldFM strict (like foldl'). - I made the datatype FiniteMap strict (put !'s everywhere). I put the programs below,

Re: Bagley shootout. Was: Lightningspeed haskell

2001-03-02 Thread Jan Kort
Simon Peyton-Jones wrote: A String is a [Char] and a Char is a heap object. So a file represented as a string takes a massive 20 bytes/char (12 for the cons cell, 8 for the Char cell). Then it's all sucked through several functions. It's entirely possible, though, that the biggest

Re: Floating point performance

2001-01-29 Thread Jan Kort
"Julian Seward (Intl Vendor)" wrote: I tried this, with ghc-4.08.1 -O both with and without profiling, on a Sparc box of I believe around 300 MHz, and I can't reproduce it at all. Without profiling, it allocates about 505 k of heap and runs in 0.02 seconds. Ummm ? J I didn't use

Floating point performance

2001-01-26 Thread Jan Kort
Hi, I noticed ghc (version 4.08.1) floating point performance is really slow on my computer: a 270Mhz sun ultra5. The program below does 1 milion floating point multiplications and takes 2 seconds to run. I made a profile and it says most of the time (93%) is spent in the function bar. Any idea

Re: C stack

2000-12-15 Thread Jan Kort
Simon Marlow wrote: I don't forsee any problems with the C stack - the stack pointer stays static during execution of Haskell code, and only moves when we do a C call or return to the RTS. But how do I get the address of the bottom of the stack ? It seems I can define a C main so I can get

C stack

2000-12-14 Thread Jan Kort
Hi, I'm trying to write an interface for a C library that uses a Boehm type garbage collector. So, I need to get the address of the bottom of the C stack. In a C application this would look something like: main() { int bottomOfStack; } Where "bottomOfStack" would be the thing I need.