chaddai.fouche:
> For the translation of the above OCaml code, there is not much to do,
> in fact it is mostly functional, and so easily translated in Haskell
> code, note that I add a code to handle input of the form
> "4.8.5.3..7..2.6.8.4..1...6.3.7.5..2.1.4...
Am Montag, 27. August 2007 10:09 schrieb manu:
> Daniel Fischer's modifications to my original program lead to a 400 %
> speed boost !!!
> (It now runs in 22 seconds on my machine)
> He avoided unecessary calls to 'length', uses Array instead of Map,
> refactored 'search' function (details below)
>
From: Daniel Fischer
> Thought it was something like that.
> Must check whether that beats Norvig's constraint propagation.
it does !
on my machine :
Jon Harrop's : 12.5 sec and Norvig's : 15 sec
Manu
___
Haskell-Cafe mailing list
Haskell-Cafe@hask
For the translation of the above OCaml code, there is not much to do,
in fact it is mostly functional, and so easily translated in Haskell
code, note that I add a code to handle input of the form
"4.8.5.3..7..2.6.8.4..1...6.3.7.5..2.1.4..",
to resolve it and
Am Montag, 27. August 2007 14:40 schrieb Jon Harrop:
> > Probably not, but what's wrong with using arrays (here and in general)?
> > Here I find arrays very natural, after all a grid has a fixed set of
> > indices. And as they have a much faster lookup than maps (not to mention
> > lists), what do
On Monday 27 August 2007 11:54:20 you wrote:
> Am Montag, 27. August 2007 11:24 schrieb Jon Harrop:
> > You shouldn't have any problem writing a purely functional solver that is
> > faster and much shorter than Norvig's Python without having to use
> > arrays.
>
> Probably not, but what's wrong wit
Am Montag, 27. August 2007 11:24 schrieb Jon Harrop:
> On Monday 27 August 2007 09:09:17 manu wrote:
> > Daniel Fischer's modifications to my original program lead to a 400 %
> > speed boost !!!
> > (It now runs in 22 seconds on my machine)
> > He avoided unecessary calls to 'length', uses Array in
On Monday 27 August 2007 09:09:17 manu wrote:
> Daniel Fischer's modifications to my original program lead to a 400 %
> speed boost !!!
> (It now runs in 22 seconds on my machine)
> He avoided unecessary calls to 'length', uses Array instead of Map,
> refactored 'search' function (details below)
>
Daniel Fischer's modifications to my original program lead to a 400 %
speed boost !!!
(It now runs in 22 seconds on my machine)
He avoided unecessary calls to 'length', uses Array instead of Map,
refactored 'search' function (details below)
I've put up his version on hpaste : http://hpaste.o
I wrote:
>> Perhaps you would gain something if you used Data.Map.!
>> instead of your "lookup".
Manu wrote:
> I'm not sure I understand, do you mean I should have use a strict Map
> constructor ?
> like : Map !key !value ?
No, there is an operator in Data.Map called "!".
> how can it replace th
From: Malte Milatz <[EMAIL PROTECTED]>
Subject: Re: [Haskell-cafe] Norvig's Sudoku Solver in Haskell
Your program was wrapped by your mail client, so you may want to
hpaste
your program for easier digestion.
here it is : http://hpaste.org/2452
Your profiling output suggest
Manu wrote:
>> Should I introduce more strictness ? replace lists with more
>> efficient data structures (ByteStrings, Arrays) ?
Derek wrote:
> Yes. Treating lists like arrays is always a recipe
> for heartbreak.
Here it costs very little - the lists are all short, mostly of
length exactly 9.
>
Hi Manu,
You wrote:
> After reading Peter Norvig's take on writing a Sudoku solver
> (http://> norvig.com/sudoku.html)
> I decided that I would port his program to Haskell, without changing
> the algorithm, that'll make a nice exercise I thought
> and should be fairly easy... Boy, was I wrong !
W
manu <[EMAIL PROTECTED]>:
> After reading Peter Norvig's take on writing a Sudoku solver (http://
> norvig.com/sudoku.html)
> I decided that I would port his program to Haskell
Your program was wrapped by your mail client, so you may want to hpaste
your program for easier digestion.
> Being a be
On Sun, 2007-08-26 at 14:50 +0200, manu wrote:
> Hello,
>
> After reading Peter Norvig's take on writing a Sudoku solver (http://
> norvig.com/sudoku.html)
> I decided that I would port his program to Haskell, without changing
> the algorithm, that'll make a nice exercise I thought
> and should
Hello,
After reading Peter Norvig's take on writing a Sudoku solver (http://
norvig.com/sudoku.html)
I decided that I would port his program to Haskell, without changing
the algorithm, that'll make a nice exercise I thought
and should be fairly easy... Boy, was I wrong !
Anyway, I eventually
16 matches
Mail list logo