haskell / haskell/vector

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

Open
#182 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
400
Forks
145
PR merge metrics
No merged PRs in 30d

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.