| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@jasnell @joyeecheung There have been some small changes since your reviews. Can you re-review? |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
I don't really understand this comment. Is it supposed to mean "This is possible because we still have the whole string intact"? If so, it only makes sense in the context of this change. I don't think it explains the code well.
Sorry, something went wrong.
There was a problem hiding this comment.
The intention of the comment is around the choice of using the start index for comparison. Maybe it can be written in a better way. I will work on it.
Sorry, something went wrong.
There was a problem hiding this comment.
If the goal is to remove str.substr (presumably because it allocated memory), why not replace this with str.compare? Or does the compiler optimize this substr call away?
Sorry, something went wrong.
There was a problem hiding this comment.
Not sure about the implementation of compare and how it handles the comparison and allocation but from a higher level point of view it seems valid.
Sorry, something went wrong.
There was a problem hiding this comment.
compare returns an integer. If the strings are equal, the return value is 0.
Sorry, something went wrong.
Reduced the number of substring calls by 1 as it is a linear time complexity function. Thus having a larger path might lead to decrease in performance. Also removed unnecessary string allocation happening in the block.
Sorry, something went wrong.
Reduced the number of substring calls by 1 as it is a linear time complexity function. Thus having a larger path might lead to decrease in performance. Also removed unnecessary string allocation happening in the block. PR-URL: #34808 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reduced the number of substring calls by 1 as it is a linear time complexity function. Thus having a larger path might lead to decrease in performance. Also removed unnecessary string allocation happening in the block. PR-URL: #34808 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reduced the number of substring calls by 1 as it is a linear time complexity function. Thus having a larger path might lead to decrease in performance. Also removed unnecessary string allocation happening in the block. PR-URL: nodejs#34808 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
| Back | FazBrowse Home | New Git URL |
Checklist