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

Faster simplifyPath #752

Open
gissuebot opened this issue Oct 31, 2014 · 7 comments
Open

Faster simplifyPath #752

gissuebot opened this issue Oct 31, 2014 · 7 comments
Labels

Comments

@gissuebot
Copy link

Original issue created by thomas.andreas.jung on 2011-10-11 at 11:02 AM


I've reimplemented the Files.simplifyPath method. It works on two char
arrays. Scanning and and copying characters from the input char array
to the output char array. According to my microbenchmark it's at least
4 times faster than the current implementation. The readability of the
current implementation is much better than my implementation which is
quite low-level.

@gissuebot
Copy link
Author

Original comment posted by cpovirk@google.com on 2011-10-13 at 05:50 PM


(No comment entered for this change.)


Status: Triaged

@gissuebot
Copy link
Author

Original comment posted by kevinb@google.com on 2011-11-15 at 10:16 PM


This is appreciated, but given how many problems we've had to deal with with this method, we're hesitant to do anything that makes the code even a little less understandable right now. In time we might gain more confidence that we finally have enough tests....


Labels: Type-Performance

@gissuebot
Copy link
Author

Original comment posted by thomas.andreas.jung on 2011-11-17 at 06:39 AM


It's okay to close the issue. More issues in limbo won't help.

(Rant:

  • If readability is the issue this won't change.The old implementation was at least as hard to read but made it somehow into Guava. I tried to find bugs in the old implementation because it was so hard to read and I couldn't believe that it was without bugs.
  • If unknown bugs are the problem, I don't know how you could gain more confidence without adding more tests. You can run both implementations and compare results. No one knows which implementation has more bugs, only that both pass all tests that are there right now. I can't see clear criteria when code can be added. The old implementation made it into RC1 with few tests (and a lot of bugs). Somehow there was the false confidence in this implementation that it is correct.)

@gissuebot
Copy link
Author

Original comment posted by wasserman.louis on 2011-11-29 at 04:16 PM


Thomas, I'm going to take a whack at making your implementation more readable without sacrificing speed.

@gissuebot
Copy link
Author

Original comment posted by fry@google.com on 2011-12-10 at 04:21 PM


(No comment entered for this change.)


Labels: Package-IO

@gissuebot
Copy link
Author

Original comment posted by fry@google.com on 2012-02-16 at 07:17 PM


(No comment entered for this change.)


Status: Acknowledged

@gissuebot
Copy link
Author

Original comment posted by kevinb@google.com on 2012-06-22 at 06:16 PM


(No comment entered for this change.)


Status: Research

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

No branches or pull requests

3 participants