Re: [Haskell-cafe] Vedr: To my boss: The code is cool, but it is about 100 times slower than the old one...

2012-11-29 Thread Johan Tibell
On Thu, Nov 29, 2012 at 2:02 PM, Johan Tibell wrote: > On Thu, Nov 29, 2012 at 2:01 PM, Daniel Fischer > wrote: >> On Donnerstag, 29. November 2012, 13:40:42, Johan Tibell wrote: >>> word2Double :: Word -> Double >>> word2Double (W# w) = D# (int2Double# (word2Int# w)) >>> >>> On my (64-bit) machi

Re: [Haskell-cafe] Vedr: To my boss: The code is cool, but it is about 100 times slower than the old one...

2012-11-29 Thread Daniel Fischer
On Donnerstag, 29. November 2012, 13:40:42, Johan Tibell wrote: > > word2Double :: Word -> Double > word2Double (W# w) = D# (int2Double# (word2Int# w)) > > On my (64-bit) machine the Haskell and C versions are on par. On my box, the Haskell is even faster then, but, as said, the result is incor

Re: [Haskell-cafe] Vedr: To my boss: The code is cool, but it is about 100 times slower than the old one...

2012-11-29 Thread Johan Tibell
On Thu, Nov 29, 2012 at 2:01 PM, Daniel Fischer wrote: > On Donnerstag, 29. November 2012, 13:40:42, Johan Tibell wrote: >> word2Double :: Word -> Double >> word2Double (W# w) = D# (int2Double# (word2Int# w)) >> >> On my (64-bit) machine the Haskell and C versions are on par. > > Yes, but the resu

Re: [Haskell-cafe] Vedr: To my boss: The code is cool, but it is about 100 times slower than the old one...

2012-11-29 Thread Daniel Fischer
On Donnerstag, 29. November 2012, 13:40:42, Johan Tibell wrote: > word2Double :: Word -> Double > word2Double (W# w) = D# (int2Double# (word2Int# w)) > > On my (64-bit) machine the Haskell and C versions are on par. Yes, but the result is very different. _

Re: [Haskell-cafe] Vedr: To my boss: The code is cool, but it is about 100 times slower than the old one...

2012-11-29 Thread Johan Tibell
On Thu, Nov 29, 2012 at 1:40 PM, Johan Tibell wrote: > This version works around the Word->Double conversion bug and shows > good performance: I'd also like to point out that I've removed lots of bang patterns that weren't needed. This program runs fine without any bang patterns (but I've kept th

Re: [Haskell-cafe] Vedr: To my boss: The code is cool, but it is about 100 times slower than the old one...

2012-11-29 Thread Johan Tibell
On Thu, Nov 29, 2012 at 1:32 PM, Daniel Fischer wrote: > We have an unpleasant regression in comparison to 7.2.* and the 7.4.* were > slower than 7.6.1 is, but it's all okay here (not that it wouldn't be nice to > have it faster still). > > Are you on a 32-bit system? This version works around th

Re: [Haskell-cafe] Vedr: To my boss: The code is cool, but it is about 100 times slower than the old one...

2012-11-29 Thread Daniel Fischer
On Donnerstag, 29. November 2012, 21:00:36, Fixie Fixie wrote: > The program seems to take around 6 seconds on my linux-box, while the c > version goes for 0.06 sekcond. > > That is really some regression bug :-) > > Anyone with a more recent version thatn 7.4.1? I don't even have a problem with

[Haskell-cafe] Vedr: To my boss: The code is cool, but it is about 100 times slower than the old one...

2012-11-29 Thread Fixie Fixie
That's really an argument for upgrading to 7.4.2 :-) Another reason for doing things with haskell is this mailing list. Thanks! Felix Fra: Johan Tibell Til: Fixie Fixie Kopi: Haskell cafe Sendt: Torsdag, 29. november 2012 22.06 Emne: Re: [Haskell-cafe] To

[Haskell-cafe] Vedr: To my boss: The code is cool, but it is about 100 times slower than the old one...

2012-11-29 Thread Fixie Fixie
The program seems to take around 6 seconds on my linux-box, while the c version goes for 0.06 sekcond. That is really some regression bug :-) Anyone with a more recent version thatn 7.4.1? Felix Fra: Johan Tibell Til: Fixie Fixie Kopi: Haskell cafe Sendt