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

Improve compilation time

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

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
haskell

Research direction

Start by measuring clean builds of vector and comparing them with containers and unordered-containers. Investigate the listed possibilities, including implicit fusion in #457, package splitting, optimization flags, inlining, and specialization; done means establishing a concrete approach that reduces compilation time.

Written by the indexing model from the issue text.

Description

I was wondering if it is possible to improve the compilation time for vector. On my machine, compiling it from scratch currently takes about 1.5 minutes (1 m 35 s), which I feel like is too long. For comparison, containers takes 45 seconds and unordered-containers takes 23 seconds. Yes, I know, cabal caches the build, but it's still annoying (you still have to compile it when switching to a new GHC version, contributing to vector, in CI, when non-Haskell people want to install a tool using vector,...).

Some ideas that might help to decrease compilation time:

  • disable implicit fusion (#457)
  • split vector into several smaller packages (e.g. vector-core, vector-storable, vector-unboxed), so that users only have to depend on the parts they actually use (vector would stay the same, so people could just keep using it)
  • don't use -O2 (find out which flags significantly improve performance and only enable those)
  • reduce inlining (this is probably hard without also reducing performance)
  • avoid redefinitions for specialization (this would be a breaking change, but idk how big the impact would be)

I'm curious how realistic you find my ideas and if you have other ideas to improve compilation time.

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.