Skip to content

WIP: new array primops for delete, insert, update

Vilem-Benjamin Liepelt requested to merge wip/buggymcbugfix/insertArray into master

Implemented as part of my summer of code project. This relates to the following draft GHC proposal discussion: https://github.com/ghc-proposals/ghc-proposals/pull/335.

The code here is still WIP and is much less fancy than some possibilities mentioned in the GHC proposal discussion. I have some ideas for a much more general and safe variadic primop, inspired by arrayOf# (!3571) and will continue to work on this in my free time.

There are some benchmarks here: https://github.com/buggymcbugfix/array-benchmark

I am currently getting GC crashes (update case) and segfaults (delete case) with the benchmark (on Linux), implying that the primop implementations are buggy. On the other hand I patched unordered-containers to use these primops and all the benchmarks and tests passed (on Mac). Could this be a platform-related issue? I will investigate this.

Edited by Vilem-Benjamin Liepelt

Merge request reports