could someone explain sharing?
In the code below, allstrings2 is 6X as fast as allstrings. I assume
because of sharing, but I don't intuitively see a reason why.
can someone give me some pointers, perhaps using debug.trace or other
tools (profiling?) to show where the first version is being
Well, I'm hardly the one knowing GHC internals, but...
In allstrings you continue calling strings with same arguments again
and again. Don't fool yourself, it's not going to automagically
memorize what you were doing before. In fact, I'd expect much more
speed loss. If you increase your
Thomas Hartman wrote:
could someone explain sharing?
In the code below, allstrings2 is 6X as fast as allstrings. I assume
because of sharing, but I don't intuitively see a reason why.
can someone give me some pointers, perhaps using debug.trace or other
tools (profiling?) to show where the
Thomas Hartman wrote:
could someone explain sharing?
A good tool for visualising the difference between shared and non-shared
results would be vacuum, using one of its front ends, vacuum-cairo or
vacuum-ubigraph.
http://hackage.haskell.org/package/vacuum
On Wed, Jun 17, 2009 at 7:30 PM, GüŸnther Schmidtgue.schm...@web.de wrote:
Hi all,
you have come up with so many solutions it's embarrassing to admit that I
didn't come up with even one.
I have the similarly difficulties, but I found to understand some of
these answers,
equational reasoning
Daniel Peebles pumpkingod at gmail.com writes:
My solution attempted to exploit this using Numeric.showIntAtBase but
failed because of the lack of 0 prefixes in the numbers. If you can
find a simple way to fix it without duplicating the showIntAtBase
code, I'd be interested!
Another
On Thu, 2009-06-18 at 23:57 +0800, Lee Duhem wrote:
[...] I have prepared a blog post for how
I worked out some of these answers, here is the draft of it, I hope it
can help you too.
Nice post! Certainly, pen-and-paper reasoning like this is a very good
way to develop deeper intuitions.
On Fri, Jun 19, 2009 at 6:17 AM, Matthew Brecknellhask...@brecknell.org wrote:
On Thu, 2009-06-18 at 23:57 +0800, Lee Duhem wrote:
[...] I have prepared a blog post for how
I worked out some of these answers, here is the draft of it, I hope it
can help you too.
Nice post! Certainly,
Hi all,
you have come up with so many solutions it's embarrassing to admit that
I didn't come up with even one.
Günther
Günther Schmidt schrieb:
Hi guys,
I'd like to generate an infinite list, like
[a, b, c .. z, aa, ab, ac .. az, ba, bb, bc ..
bz, ca ...]
When I had set out to do
Günther Schmidt gue.schmidt at web.de writes:
Hi guys,
I'd like to generate an infinite list, like
[a, b, c .. z, aa, ab, ac .. az, ba, bb, bc ..
bz, ca ...]
If you're happy to have a before the a, you can do this as a fairly cute
one-liner in a similar style to this list of
Dear Ross,
thanks for your post, you got it almost right, I needed something like
aa, ab, ac ...
It seems that Thomas has figured it out.
Günther
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hi Thomas,
thanks, it seems you found it.
I find it a bit embarrassing that I was unable to figure this out myself.
Günther
Thomas Davie schrieb:
letterCombos = map (:[]) ['a'..'z'] ++ concatMap (\c - map ((c++) .
(:[])) ['a'..'z']) letterCombos
Not hugely efficient, if you generate the
Oh sorry about that, misread the problem.
-Ross
On Jun 16, 2009, at 9:16 PM, Günther Schmidt wrote:
Dear Ross,
thanks for your post, you got it almost right, I needed something
like aa, ab, ac ...
It seems that Thomas has figured it out.
Günther
Hi Tom,
thanks for that.
I remembered reading about that in my earliest haskell days, couldn't
find it again and couldn't get it right by myself either.
Günther
Tom Pledger schrieb:
Günther Schmidt gue.schmidt at web.de writes:
Hi guys,
I'd like to generate an infinite list, like
[a,
Hi Ross,
no problem at all, I certainly appreciate it.
Günther
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi Richard,
I'd have to guess here :)
Maybe, what you have in mind, is:
generate an infinite list with numbers from [1 ..], map it to base 26?
Günther
Richard O'Keefe schrieb:
On 17 Jun 2009, at 12:28 pm, GüŸnther Schmidt wrote:
Hi guys,
I'd like to generate an infinite list, like
16 matches
Mail list logo