
lemming:
On Sun, 17 Jun 2007, Donald Bruce Stewart wrote:
simonmarhaskell:
Henning Thielemann wrote:
The program is compiled with GHC-6.4 and option -O2, CPU clock 1.7 GHz.
ByteString is much faster with GHC 6.6, IIRC. We optimised the representation of ForeignPtr, and ByteString takes advantage of that. I recommend upgrading.
Yes, a 2x speedup isn't uncommon.
Indeed, in my simple example the speedup factor was 2. However this is still far from being enough for real-time signal processing. I found another problem: The rounding functions from RealFrac are much slower than GHC.Float.double2Int. I've set up a bug ticket in GHC trac.
if there's floating point math involved, carefully check the Core output. -ddump-simpl -O2
ByteString is even faster with the GHC head, branch, given the cranked up rules and constructor specialisation.
Can I test them without compiling GHC myself? I.e. can I still install the FPS package separately?
oh, i was just suggesting trying the GHC HEAD branch for its improved optimisations, not the `unstable' branch of fps. -- Don