+) 0)
Using 'sum' turned to be rather misleading (took up to a minute to sum
up 'Double's; this problem was less apparent for p1), so I had to use
foldl' here to get consistent results between 'Int's and
'Double's. '`using` rnf' produced similar re
sing StdGen), I noticed that while performance is comparable, using
getRandomRs to get a list of random numbers is a lot faster than
replicating uniform (or getRandomR for that matter). I don't know if
this kind of speed gain makes sense for random-fu though.
rot. Its RandomGen instance lacks the split functionality but I guess it
could be used with MonadRandom.
--
Gökhan San
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
;-' : itos (negate x)
| x < 10= "0123456789" !! x : ""
| otherwise = let (q, r) = x `quotRem` 10
in itos q ++ itos r
--
Gökhan San
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Manlio Perillo writes:
> Gökhan San ha scritto:
>> Manlio Perillo writes:
>>
>>> The stream generator implements tha RandomGen interface.
>>
>> This is really cool, though I think 'split' is a must. Maybe all
>> instances could share the same
my
system, it is less than 2 times slower than StdGen.
--
Gökhan San
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Saturday September 13 2008, Han Joosten wrote:
> > data Rule = RuRule
> > | SgRule
> > | GcRule
> > | FrRule
> > deriving (Eq,Show)
Here, Rule is a type constructor, whereas RuRule and others are data
constructors. Just like:
> data Bool = Fals
On Friday July 11 2008, Don Stewart wrote:
> Do you have the bencmark code? I'd like to try a couple of variants on
> the underlying structures.
It's not a thorough test but I suppose it gives an impression about
performance.
-- Gokhan
$ ghc -O -prof --make TestGraph
$ ./TestGraph +RTS -s -P -R
On Friday July 11 2008, Andre Nathan wrote:
> On Thu, 2008-07-10 at 16:52 -0700, Don Stewart wrote:
> > Well, they're radically different graph representations, and fgl
> > hasn't been designed for large graphs.
>
> Do you know if King and Launchbury's implementation (Data.Graph) scales
> better?
Hello All,
I've recently modified my existing project to support dynamic data
(using 'Data.Dynamic'), and despite my earlier benchmarks on 'Dynamic', the
program slowed down by a factor of 10. Profiler says that 'fromDynamic' is
consuming 60% of the CPU time (with -O2).
Using the below functio
Hi,
I'm new to this, but I'll give it a shot.
> import Data.Graph.Inductive
There are several ways to build a graph. Let's say, node labels are 'String's
and edge labels are 'Double's. Edge labels would be the weights.
> grs :: [Gr String Double]
The below four lines generate the same graph.
Hi,
> {-# LANGUAGE ExistentialQuantification, ScopedTypeVariables #-}
Following the related discussion on #haskell, I ended up writing the below
code (thanks to the suggestions). This is for a genetic programming
library, but the usage would be similar. It also (de)serializes
TypeRep.
I'm a has
12 matches
Mail list logo