Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

(Unboxed.Vector Char).takeWhile is much slower then Data.Text.takeWhile

Open
#182 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
haskell
Domain
performance

Research direction

Start by reproducing the reported comparison between Vector.Unboxed.takeWhile and Data.Text.takeWhile on equivalent Char inputs. Read the implementations and measure the reported performance gap with a focused benchmark. Done means the discrepancy is explained and, if confirmed as a vector bug, the relevant behavior is improved and covered by performance evidence.

Written by the indexing model from the issue text.

Description

Hi!
I know that Data.Text has different underlying representation, but no matter what it is, it should not be faster than Unboxed Vector Char when performing takeWhile. Both libraries implement takeWhile with the same signature of takeWhile :: (Char -> Bool) -> X -> X, so they are comparing Char by Char. Unboxed Vector know the shift between elements, so if Vector.Unboxed.takeWhile is 30% slower than Data.Text.takeWhile, I think we should consider it as a bug, right?

Dominant language
Haskell
Stars
401
Forks
145
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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 haskell/vector

All issues in haskell/vector

Similar issues

More Haskell issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.