Skip to content

Usage of sort in internal modules and its impact on compilation performance #27349

@e-kayrakli

Description

@e-kayrakli

On 5/28, we took a hit on compilation time , likely because code added to the Sort module in #27277.

That's a really unfortunate side effect of using sorting in some of our internal modules, mostly around non-DR domains. Can we do something to avoid that hit?

Right now, sort is used in:

  • dsiSorted et al: the only usage of dsiSorted and sorted seems to be in the Sort module, at least in the module code. Can we make sorted on associative domains a tertiary method in the Sort module instead?
  • ChapelArray: this seems to have a workaround code for exposing the default comparator. I haven't pulled on that thread to see what would break if we were to try something else. Besides, as long as we are not calling sort, maybe it is to use Sort?
  • bulkAdd_prepareInds: This has to sort indices before adding for faster operation. I am not sure if there is a good way around this. A potential solution is to create a utility module for sparse operations and move bulk addition there, but note that += on sparse domains also needs this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions