Skip to content

Conversation

@nomeata
Copy link
Collaborator

@nomeata nomeata commented Sep 16, 2021

in issue haskell/containers#794 and PR
haskell/containers#800 an alternative
implementation of lookup is proposed which checks if the key is as
expected only when reaching the leaf. This means less branching in the
success case or when the lookup key shares long prefixes with existing
values, but may do more work when the lookup key is far away from
existing keys.

Not saying that it’s particularly doubtful that the changed code is
correct, but since we have the machinery, why not verify it? So here we
go, and yes, it goes through.

I don’t think we need to merge the PR like this, and can probably wait
for the code to reach a containers release, and then include it there.

Also, this PR currently contains a bunch of local hacks that I used to
get going again (now that I use NixOS), which need to be removed, merged
separately, or made obsolete by better changes to the setup.

in issue haskell/containers#794 and PR
haskell/containers#800 an alternative
implementation of `lookup` is proposed which checks if the key is as
expected only when reaching the leaf. This means less branching in the
success case or when the lookup key shares long prefixes with existing
values, but may do more work when the lookup key is far away from
existing keys.

Not saying that it’s particularly doubtful that the changed code is
correct, but since we have the machinery, why not verify it? So here we
go, and yes, it goes through.

I don’t think we need to merge the PR like this, and can probably wait
for the code to reach a containers release, and then include it there.

Also, this PR currently contains a bunch of local hacks that I used to
get going again (now that I use NixOS), which need to be removed, merged
separately, or made obsolete by better changes to the setup.
@nomeata
Copy link
Collaborator Author

nomeata commented Jul 15, 2022

haskell/containers#800 got merged, so maybe we should merge this too

@nomeata nomeata marked this pull request as ready for review July 15, 2022 15:38
@nomeata
Copy link
Collaborator Author

nomeata commented Jul 15, 2022

Ah, maybe not: As I said in the PR description, we should just update the version of containers that we verify

@nomeata nomeata marked this pull request as draft July 15, 2022 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant