Greg,
> The code looks ok to me -- you've deepseq'ed the list, and forcing it
> to whnf should force the deepseq. Also, criterion runs your benchmark
> many times, if your code was measuring the RNG time it would only
> happen once. This would show up in the criterion output as an
> unusually larg
On Wed, 19 Oct 2011 21:21:48 +0200, Gregory Collins
wrote:
On Wed, Oct 19, 2011 at 5:03 PM, Johan Tibell
wrote:
It does. You need to use evaluate to have ensure actually be evaluated.
I'm almost certain you're wrong about this. The bang pattern on the
return from ensure (!r1 <- ensure
On Wed, Oct 19, 2011 at 12:21 PM, Gregory Collins
wrote:
> On Wed, Oct 19, 2011 at 5:03 PM, Johan Tibell
> wrote:
> >
> > It does. You need to use evaluate to have ensure actually be evaluated.
> >
>
> I'm almost certain you're wrong about this. The bang pattern on the
> return from ensure (!r1 <
On 19 October 2011 17:03, Johan Tibell wrote:
> Have a look at:
>
> https://github.com/tibbe/unordered-containers/blob/master/benchmarks/Benchmarks.hs
I see you use the (evaluate . rnf) composition.
I also used it in:
https://github.com/basvandijk/vector-bytestring/blob/master/bench.hs#L118
an
On Wed, Oct 19, 2011 at 5:03 PM, Johan Tibell wrote:
>
> It does. You need to use evaluate to have ensure actually be evaluated.
>
I'm almost certain you're wrong about this. The bang pattern on the
return from ensure (!r1 <- ensure $ ...) forces r1 to WHNF, which goes
through deepseq, and thus t
Hi,
On Wed, Oct 19, 2011 at 1:13 AM, Kazu Yamamoto wrote:
> Hello,
>
> I'm measuring performance of the insertion operation of red-black
> trees. For input, three kinds of [Int] are prepared: the increasing
> the order, decreasing order, and random.
>
> The random case is 4 or 5 times slower tha
On 19 October 2011 19:21, Gregory Collins wrote:
> On Wed, Oct 19, 2011 at 10:13 AM, Kazu Yamamoto wrote:
>> Hello,
>>
>> I'm measuring performance of the insertion operation of red-black
>> trees. For input, three kinds of [Int] are prepared: the increasing
>> the order, decreasing order, and ra
On Wed, Oct 19, 2011 at 10:13 AM, Kazu Yamamoto wrote:
> Hello,
>
> I'm measuring performance of the insertion operation of red-black
> trees. For input, three kinds of [Int] are prepared: the increasing
> the order, decreasing order, and random.
>
> The random case is 4 or 5 times slower than the
Hello,
I'm measuring performance of the insertion operation of red-black
trees. For input, three kinds of [Int] are prepared: the increasing
the order, decreasing order, and random.
The random case is 4 or 5 times slower than the others. I'm afraid
that my program also measured the cost of random