[Haskell-cafe] Slow IO?
Peter Verswyvelen
bugfact at gmail.com
Sun Aug 30 08:36:55 EDT 2009
Well, Steve wrote:
> I compared the top 10 C/C++ results against the top 10 Haskell results:
So to me it seems he's not talking about his code.
Anyway, I thought Haskell's ByteString IO should not be that much slower
anyway.
Not sure how lazy ByteString IO is implemented, but if it performs async
(aka overlapped) IO, it could be very very fast (faster than C), since the
reading of the next buffer from (or writing of the previous buffer to) the
file is then completely parallel with the computation (when done inplace you
even don't need a memcpy, although these days the overhead of copying 64KB
of memory might be very tiny, it used to be different in the old days :-) At
least that's how I did it in the past in C++ with templates, which was
faster than the C approach.
On Sun, Aug 30, 2009 at 2:15 PM, Bulat Ziganshin
<bulat.ziganshin at gmail.com>wrote:
> Hello Steve,
>
> Sunday, August 30, 2009, 3:54:53 PM, you wrote:
>
> > So it looks like Haskell is ~13 slower for IO than C/C++, even (I
> > assume) when using Data.ByteString or other speed-up tricks.
>
> it means that *your* program is 13x slower than C one and nothing
> more. in particular, your program may be constrained by readInt
> speed
>
>
> --
> Best regards,
> Bulat mailto:Bulat.Ziganshin at gmail.com
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090830/5707e689/attachment.html
More information about the Haskell-Cafe
mailing list