haskell / haskell/containers

Should dfs be lazy?

Open
#918 8 comments 0 reactions 0 assignees View on GitHub
Graph performance
Dominant language
Haskell
Stars
355
Forks
194
Avg merge
3d 4h
Merged PRs (30d)
4

Description

The original paper we base `Data.Graph` on expects *lazy* `ST`, but we use *strict* `ST`. Depending how the result is consumed, lazier might be better. For ordered traversals (producing lists rather than trees/forests), we can use strict `ST` along with `unsafeInterleaveST`, which may be faster.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.