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

ListBuffer.last should take O(1) time #9906

Closed
scabug opened this issue Aug 26, 2016 · 4 comments
Closed

ListBuffer.last should take O(1) time #9906

scabug opened this issue Aug 26, 2016 · 4 comments

Comments

@scabug
Copy link

scabug commented Aug 26, 2016

ListBuffer.last currently inherits a linear-time implementation, but, given that ListBuffer already tracks the last node in the list, it shoud be dead simple to override this with a constant-time implementation. I'm happy to create a PR.

@scabug
Copy link
Author

scabug commented Aug 26, 2016

@scabug
Copy link
Author

scabug commented Aug 30, 2016

@SethTisue said:
discussion: https://groups.google.com/d/msg/scala-internals/OZv2K9ysZXA/RX3Fw-xGEAAJ (Rex K: "just an oversight, and a fix would be welcome")

@scabug
Copy link
Author

scabug commented Sep 1, 2016

@chrisokasaki said:
scala/scala#5371

@scabug
Copy link
Author

scabug commented Oct 28, 2016

@adriaanm said:
scala/scala#5371

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

No branches or pull requests

2 participants