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

2012-12-02 Thread Ivan Salazar
I see. I read some chapters from Purely Functional Data Structures when I was in college in order to understand some tree algorithms, but not the whole book. Do you think that could help me to understand performance problems with code (poorly) written in Haskell? From reading your post, I can

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

2012-12-01 Thread wren ng thornton
On 11/29/12 2:17 PM, Ivan Salazar wrote: The bad side is that direct translation of algorithms are almost always very slow and the work needed to make them perform is very mind bending. Indeed. The thing is, all algorithms make (implicit) assumptions about the cost model of the underlying

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

2012-11-29 Thread Fixie Fixie
Hi all haskellers I every now and then get the feeling that doing my job code in Haskell would be a good idea. I have tried a couple of times, but each time I seem to run into performance problems - I do lots of heavy computing. The problem seems to be connected to lazy loading, which makes

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

2012-11-29 Thread Alfredo Di Napoli
Hi there, I'm only an amateur so just my 2 cent: Haskell can be really fast, but reaching that speed can be all but trivial: you need to use different data types (e.g. ByteString vs. the normal String type) relies on unconventional IO (e.g. Conduit, Iterateee) and still be ready to go out of the

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

2012-11-29 Thread Johan Tibell
Hi Felix, On Thu, Nov 29, 2012 at 10:09 AM, Fixie Fixie fixie.fi...@rocketmail.com wrote: The problem seems to be connected to lazy loading, which makes my programs so slow that I really can not show them to anyone. I have tried all tricks in the books, like !, seq, non-lazy datatypes... My

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

2012-11-29 Thread Ivan Salazar
I hear you, my friend. What I love of Haskell is that a lot of algorithms are very clean to express and understand compared to, say, Lisp or C. Compared to Lisp, function manipulation is also very clean (even compared to Racket). A great plus is also type inference. The bad side is that direct

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

2012-11-29 Thread Clark Gaebel
If you can give an example of some underperforming code, I'm sure someone (or several people) on this list would be more than happy to help you make it more performant. Generally, it doesn't take much. It's all in knowing where to look. Also, if you know performance is key, you should be using

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

2012-11-29 Thread Fixie Fixie
Oh, my - what an indentation :-) New try: - Videresendt melding Fra: Fixie Fixie fixie.fi...@rocketmail.com Til: haskell-cafe@haskell.org haskell-cafe@haskell.org  Kopi: Clark Gaebel cgae...@uwaterloo.ca  Sendt: Torsdag, 29. november 2012 20.57 Emne: Vedr: [Haskell-cafe] To my boss: The

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

2012-11-29 Thread Johan Tibell
Ack, it seems like you're running into one of these bugs (all now fixed, but I don't know in which GHC version): http://hackage.haskell.org/trac/ghc/search?q=doubleFromInteger ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] 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:00 PM, Fixie Fixie fixie.fi...@rocketmail.com 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? On 7.4.2: $ time

Re: [Haskell-cafe] 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:23 PM, Fixie Fixie fixie.fi...@rocketmail.com wrote: That's really an argument for upgrading to 7.4.2 :-) Another reason for doing things with haskell is this mailing list. FYI I'm still looking into this issue as I'm not 100% happy with the code GHC generates.

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

2012-11-29 Thread Stephen Tetley
On 29 November 2012 18:09, Fixie Fixie fixie.fi...@rocketmail.com wrote: What is your experience, dear haskellers? To me it seems this beautiful language is useless without a better lazy/eager-analyzer. Since when has speed been the sole arbiter of utility? 10 years ago I switched from