Skip to content

Benchrunner pre-allocates arrays for all iterations which harms performance #9

@Mikah-Kainen

Description

@Mikah-Kainen

Artem

We had a bug before when GHC shared the array value and we sorted a random array only on the first iteration, and all the rest worked on a sorted array. @vidsinghal fixed it with a clever pre allocation strategy. Unfortunately, in my experiments this brings a certain performance cost (probably because GC has more stuff to care about throughout the execution). It'd be good to find a way to avoid that (but not regress back to sharing).

Relevant code is benchOnArrays and its call site.


Copied from https://github.com/michaelborkowski/lh-array-sort/issues/41.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions