48 questions
2
votes
1
answer
157
views
Haskell criterion data
I'm using criterion to benchmark a function. The end goal is to create a box plot, for different inputs to this function, however, to my understanding of criterion, the output is not enough for this.
...
1
vote
0
answers
91
views
File from assignment has import Haskell stack does not recognize
I got a download file from my University for one of my assignments, it has an import Criterion.Main that my version of stack does not recognize
I tried updating my Stack and cabal, added
#!/usr/bin/...
0
votes
2
answers
379
views
Could not find module ‘Criterion.Main’ when trying to benchmark haskell
I cannot get Criterion to work. I followed the tutorial here, installing Criterion by doing the following.
cabal update
cabal install -j --disable-tests criterion
when I try ghc -O Fibber.hs or ghc -...
2
votes
1
answer
502
views
Using Criterion in Haskell
I am very new to Haskell.
I am trying to use Criterion to get performance data. My Main module is as follows:
module Main where
import SingleThreadedBlockChain
import Data.Time.Clock.System (...
1
vote
1
answer
47
views
Invalid Criterion report when testing on large inputs with AutoBench
I am working with AutoBench since a few days testing performances of Euler's sieve on different input sizes.
My tests simply asks for the nth prime inside the list generated by Euler's sieve.
While ...
1
vote
1
answer
180
views
How can I reduce the criterion benchmark time?
I'm trying to use the criterion library to do some benchmarking.
I've tried a simple example:
module Main where
import Criterion.Types
import Criterion.Main
myConfig :: Config
myConfig = ...
3
votes
2
answers
717
views
Creating multiple Criterion Benchmarks at once
This code compiles and runs without problems:
module Main where
import Criterion.Main
main :: IO ()
main =
defaultMain
[env (return $ [1,2])
(\is ->
bgroup "group" (...
0
votes
1
answer
148
views
Passing a randomly generated list as a parameter in Haskell
I am new to Haskell and really having trouble with the whole IO thing.
I am trying to find out how long it takes to traverse a list in haskell. I wanted to generate a list of random numbers and pass ...
3
votes
2
answers
1k
views
Cabal install criterion out of memory
I'm running on a container with 768MB ram and 512 MB swap space. I can't increase either of this. cabal install criterion always gives
Failed during the building phase.
The exception was: ExitFailure ...
4
votes
1
answer
240
views
Benchmarking IO action with Criterion
I want to know how long it takes my program to read a 12.9MB .wav file into memory. The function that reads a file into memory looks as follows:
import qualified Data.ByteString as BS
...
5
votes
2
answers
1k
views
How to use criterion with stack
I set up a simple stack project, and a .cabal entry for the benchmark tests:
benchmark leaves-of-a-tree-bench
type: exitcode-stdio-1.0
hs-source-dirs: src, bench
main-is: ...
0
votes
0
answers
110
views
Criterion fails when running in ghci
I want to track the difference of time for termination of the following to versions calculating the length of a list. I have got one recursive and one tail recursive. Somehow i have got a problem when ...
4
votes
1
answer
302
views
Profiling executable with criterion
I need to profile a large number of haskell executables, hopefully in parallel. I was able to get the clock time with measure and measTime from the Criterion library, but couldn't get measCpuTime or ...
2
votes
0
answers
89
views
overhead of cabal run
I need to benhmark another project in my program, and right now I'm doing
system $ "cd " ++ projDir ++ "; cabal build"
let runProj = system $ "cd " ++ projDir ++ "; cabal run > /dev/null"
...
1
vote
0
answers
36
views
Criterion: Is it possible to alter Benchark graph?
I just started using the excellent criterion package and I was wondering if it's possible to alter the graph. For example I would need to
normalize result within a group so that the longest result of ...
7
votes
2
answers
352
views
Graphing criterion benchmarks taking different orders of magnitude of time
I have a Criterion benchmark where each bgroup corresponds to a test, and within each bgroup there are two bench values of the test with different options. For example:
main = defaultMain
[bgroup ...
4
votes
2
answers
609
views
Initialize benchmark in criterion and exclude initialization time from results
I need to benchmark some code inside IO, and criterion supports that pretty well. But I want to perform few initialization steps (different for each benchmark). The naive approach:
main = defaultMain
...
13
votes
1
answer
721
views
Cross module optimizations in GHC
I have a non-recursive function to calculate longest common subsequence that seems to perform well (ghc 7.6.1, compiled with -O2 -fllvm flags) if I measure it with Criterion in the same module. On the ...
8
votes
1
answer
370
views
Scala criterion equivalent
Is there a Scala (or Java, I guess) equivalent of criterion? I'm not just talking about a benchmarking library: check out what criterion does for HTML results.
10
votes
2
answers
2k
views
How to create data for Criterion benchmarks?
I am using criterion to benchmark my Haskell code. I'm doing some heavy computations for which I need random data. I've written my main benchmark file like this:
main :: IO ()
main = newStdGen >&...
12
votes
3
answers
1k
views
Generating HTML output from criterion
There is a nice example of HTML output from criterion at http://bos.github.com/criterion/.
Which command line option is used to generate this output?
An answer to a related question asserts that ...
8
votes
2
answers
454
views
Command line options picked up by criterion library
I have used the libraries criterion and cmdargs.
When I compile the program completely without cmdargs and run it e.g. ./prog --help then I get some unwanted response from criterion about the ...
5
votes
1
answer
369
views
Haskell benchmarking/Optimization of nf/whnf of non-strict reduction
I am trying to optimize a library which is designed to take a large data set and
then apply different operations to it. Now that the library is working, I want
to optimize it.
I am under the ...
15
votes
1
answer
3k
views
How to use Criterion to measure performance of Haskell programs?
I'm trying to measure the performance of a simple Haar DWT program using the Criterion framework. (It is erroneously slow, but I'll leave that for another question). I can't find any good ...