Benchmarks requiring -fspec-constr-recursive=16

Open
#3,187 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
haskell
Domain
performance

Research direction

The issue lists benchmark cases for UTF-8 decoding, grouping, parsing, folding, splitting, and repeated operations, but names no files or tests. Start by locating these benchmark definitions and comparing their performance with and without -fspec-constr-recursive=16. Done means identifying a general optimization that improves the cases without excessive code growth, memory use, or compile time; the issue gives no acceptance test.

Written by the indexing model from the issue text.

Description

type:performance

Some folding/grouping benchmarks (consumer loop) benchmarks are significantly improved by using -fspec-constr-recursive=16. Maybe some more intelligent optimizations can be done in general for these cases so that we do avoid bloating code and using too much memory and time during compilation.

Utf8 decoding:

splitOnSeqUtf8 :: String -> Handle -> IO Int
unicode encode/decode, especially decode

Grouping/Parser/fold/split:

    , (SpaceO_1, benchIOSink value "many" many)
    , (SpaceO_1, benchIOSink value "some" some)
    , (HeapO_n, benchIOSink value "takeEQ" $ takeEQ value)
    , (SpaceO_1, benchIOSink value "takeWhileP" $ takeWhileP value)
    , (SpaceO_1, benchIOSink value "wordBy" $ wordBy value)
    , (SpaceO_1, benchIOSink value "groupByRolling" groupByRolling)
    , mkBench "takeEndBySeq KR abcdefghi" env $ \inh _ ->
    , mkBenchSmall "interpose . splitOn" env $ \inh outh ->
     foldMany/groupsOf/ChunksOf

Some of the benchmarks performing an operation multiple times:

         "dropWhile-false" (dropWhileFalse value 4)
        , benchIOSink value "tee" (transformTeeMapM 4)
          benchIOSink value "intersperse" (intersperse value 4)
Dominant language
Haskell
Stars
926
Forks
71
Avg merge
6h 49m
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from composewell/streamly

All issues in composewell/streamly

Similar issues

More Haskell issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.