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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Copy link
Author

scabug commented Aug 26, 2016

@scabug

This comment has been minimized.

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

This comment has been minimized.

Copy link
Author

scabug commented Sep 1, 2016

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Oct 28, 2016

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