Skip to content

Use of !! to access the lists by index #1

Description

@werner291

Hi,

thanks for this code! Gotta love Simpex noise.

I do have one suggestion though: [1,2,3] gives you a Haskell list. These are linked lists (not arrays), which means that calling !! i takes O(i).

Since your data doesn't change, you're probably better off using Vector, which gives O(1) indexing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions