Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semitokens versus tokens in sorted containers #669

Closed
StephenVavasis opened this issue Aug 29, 2020 · 2 comments
Closed

Semitokens versus tokens in sorted containers #669

StephenVavasis opened this issue Aug 29, 2020 · 2 comments

Comments

@StephenVavasis
Copy link
Contributor

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?

@oxinabox
Copy link
Member

My inclination is towards removing semitokens.
Removing things is a breaking change so we need to do it before 1.0
adding them back is non-breaking and we can do that post-1.0 if it turns out that halving memory used was super important to someone.

@StephenVavasis
Copy link
Contributor Author

Closed via #787

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants