Skip to content

Semitokens versus tokens in sorted containers #669

Closed
@StephenVavasis

Description

@StephenVavasis

A "token" for a sorted container is a tuple (container,s), where s is called a "semitoken" and is just a wrapped integer. Many of the functions in the sorted container suite take or return semitokens rather than tokens because in pre-1.5 Julia, tuples with a mutable element needed to be passed around on the heap instead of the stack. According to this thread in discourse: https://discourse.julialang.org/t/arrays-of-structs-tuples-with-mutable-members/45754/5 this limitation no longer applies. Semitokens still have a slight advantage over tokens in that they take up half the storage space, but otherwise, there does not seem to be a performance advantage of working with semitokens.

Question: should the package get rid of semitokens entirely? They are a bit kludgy but possibly people are using them in codes right now. (I am.) Or should the documentation be clarified but the kludge remains?

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