the version 0.6.1 which is on hackage is not the version in the git repository, the histograms function is missing. Would you please release the master HEAD on hackage?
They actually are the same. The issue is the histograms function is not exported. Without some idea about performance I'm not sure I want to actually include histograms in the API.
Ok, I see. I can implement your three proposed versions and add a criterion benchmark to see which one is the fastest.
Another Question is, does it make sense to add algorithms like that in this package or create a algorithm package where we can collect imageprocessing stuff. I really like the idea of having a package with fast computervision algorithms, I think repa is a really good foundation for that. What's your long-term goal?
It was my original intent to include image processing in JP-Repa as another module (so perhaps Codec.Picture.Repa.Processing). However, I don't have time to do anything on this front for the forseeable future. If you desire to make such a module and submit a patch (or series of patches) then I'd be happy to merge.
I created a criterion benchmark for the histogram generation as a testbed for different implementations.
The presence of Prelude.foldl in your gist is doubtful, as the default foldl is known to be space leaking. Did you tried it with List.foldl' (the strict version) instead? This might resolve your problems with computeUnboxedP