Commit 8aa259d7 authored by Bodigrim's avatar Bodigrim
Browse files

Immerse benchmarks in the main text package

parent 26a6750d
......@@ -11,4 +11,4 @@
/cabal.test.project.local
# Test data repo ignored. Please see instruction in tests-and-benchmarks.markdown
/tests/text-test-data/
/benchmarks/text-test-data/
/dist/
/dist-newstyle/
/.ghc.environment.*
/cabal.project.local
\ No newline at end of file
Jasper Van der Jeugt <jaspervdj@gmail.com>
Bryan O'Sullivan <bos@serpentine.com>
Tom Harper <rtomharper@googlemail.com>
Duncan Coutts <duncan@haskell.org>
../LICENSE
\ No newline at end of file
import Distribution.Simple
main = defaultMain
-- NB: we use a separate project
packages: .
......@@ -70,4 +70,4 @@ main = do
]
where
-- Location of a test file
tf = ("../tests/text-test-data" </>)
tf = ("benchmarks/text-test-data" </>)
......@@ -25,7 +25,7 @@ benchmarks = [
main :: IO ()
main = do
!contents <- decodeUtf8 `fmap` B.readFile "../tests/text-test-data/yiwiki.xml"
!contents <- decodeUtf8 `fmap` B.readFile "benchmarks/text-test-data/yiwiki.xml"
forM_ benchmarks $ \(name, bmark) -> do
putStr $ name ++ " "
hFlush stdout
......
cabal-version: 1.12
name: text-benchmarks
version: 0.0.0.0
synopsis: Benchmarks for the text package
description: Benchmarks for the text package.
homepage: https://bitbucket.org/bos/text
license: BSD2
license-file: LICENSE
author: Jasper Van der Jeugt <jaspervdj@gmail.com>,
Bryan O'Sullivan <bos@serpentine.com>,
Tom Harper <rtomharper@googlemail.com>,
Duncan Coutts <duncan@haskell.org>
maintainer: jaspervdj@gmail.com
category: Text
build-type: Simple
tested-with: GHC==9.0.1,
GHC==8.10.4, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4,
GHC==8.2.2, GHC==8.0.2
flag bytestring-builder
description: Depend on the bytestring-builder package for backwards compatibility.
default: False
manual: False
flag llvm
description: use LLVM
default: False
manual: True
benchmark text-benchmarks
type: exitcode-stdio-1.0
ghc-options: -Wall -O2 -rtsopts
if flag(llvm)
ghc-options: -fllvm
cpp-options: -DINTEGER_GMP
build-depends: array,
base == 4.*,
binary,
bytestring-lexing >= 0.5.0,
containers,
tasty-bench >= 0.2,
deepseq,
directory,
filepath,
ghc-prim,
integer-gmp,
stringsearch,
template-haskell,
text,
transformers,
utf8-string,
vector
if flag(bytestring-builder)
build-depends: bytestring >= 0.9 && < 0.10.4,
bytestring-builder >= 0.10.4
else
build-depends: bytestring >= 0.10.4
-- modules for benchmark proper
c-sources: cbits-bench/time_iconv.c
hs-source-dirs: haskell
main-is: Benchmarks.hs
other-modules:
Benchmarks.Builder
Benchmarks.Concat
Benchmarks.DecodeUtf8
Benchmarks.EncodeUtf8
Benchmarks.Equality
Benchmarks.FileRead
Benchmarks.FoldLines
Benchmarks.Mul
Benchmarks.Programs.BigTable
Benchmarks.Programs.Cut
Benchmarks.Programs.Fold
Benchmarks.Programs.Sort
Benchmarks.Programs.StripTags
Benchmarks.Programs.Throughput
Benchmarks.Pure
Benchmarks.ReadNumbers
Benchmarks.Replace
Benchmarks.Search
Benchmarks.Stream
Benchmarks.WordFrequencies
default-language: Haskell2010
default-extensions: NondecreasingIndentation
other-extensions: DeriveAnyClass
benchmark text-multilang
type: exitcode-stdio-1.0
hs-source-dirs: haskell
main-is: Multilang.hs
other-modules: Timer
ghc-options: -Wall -O2
build-depends: base == 4.*,
bytestring,
text,
time
default-language: Haskell2010
default-extensions: NondecreasingIndentation
benchmarks: >=7.4
jobs-selection: any
benchmarks: >=7.6
doctest: <9.0
doctest-options: -fobject-code -DINTEGER_GMP
branches: master
......
packages: .
packages: benchmarks
tests: True
benchmarks: True
constraints: semigroups -text -hashable -unordered-containers
......@@ -64,14 +64,6 @@ extra-source-files:
-- scripts/CaseFolding.txt
-- scripts/SpecialCasing.txt
README.markdown
benchmarks/Setup.hs
benchmarks/cbits-bench/*.c
benchmarks/haskell/*.hs
benchmarks/haskell/Benchmarks/*.hs
benchmarks/haskell/Benchmarks/Programs/*.hs
benchmarks/python/*.py
benchmarks/ruby/*.rb
benchmarks/text-benchmarks.cabal
changelog.md
include/*.h
scripts/*.hs
......@@ -254,3 +246,68 @@ test-suite tests
default-language: Haskell2010
default-extensions: NondecreasingIndentation
benchmark text-benchmarks
type: exitcode-stdio-1.0
ghc-options: -Wall -O2 -rtsopts
build-depends: base,
binary,
bytestring-lexing >= 0.5.0,
containers,
deepseq,
filepath,
stringsearch,
tasty-bench >= 0.2,
text,
transformers,
utf8-string,
vector
if flag(bytestring-builder)
build-depends: bytestring >= 0.9 && < 0.10.4,
bytestring-builder >= 0.10.4
else
build-depends: bytestring >= 0.10.4
c-sources: benchmarks/cbits-bench/time_iconv.c
hs-source-dirs: benchmarks/haskell
main-is: Benchmarks.hs
other-modules:
Benchmarks.Builder
Benchmarks.Concat
Benchmarks.DecodeUtf8
Benchmarks.EncodeUtf8
Benchmarks.Equality
Benchmarks.FileRead
Benchmarks.FoldLines
Benchmarks.Mul
Benchmarks.Programs.BigTable
Benchmarks.Programs.Cut
Benchmarks.Programs.Fold
Benchmarks.Programs.Sort
Benchmarks.Programs.StripTags
Benchmarks.Programs.Throughput
Benchmarks.Pure
Benchmarks.ReadNumbers
Benchmarks.Replace
Benchmarks.Search
Benchmarks.Stream
Benchmarks.WordFrequencies
default-language: Haskell2010
default-extensions: NondecreasingIndentation
other-extensions: DeriveAnyClass
benchmark text-multilang
type: exitcode-stdio-1.0
hs-source-dirs: benchmarks/haskell
main-is: Multilang.hs
other-modules: Timer
ghc-options: -Wall -O2
build-depends: base == 4.*,
bytestring,
text,
time
default-language: Haskell2010
default-extensions: NondecreasingIndentation
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment