Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gh-117648: Remove unneeded and imprecise NEWS entry #117693

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

Closed
wants to merge 1 commit into from

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Apr 9, 2024

I'm not sure a NEWS entry is needed for this change; alternatively, it should be made more accurate.

The speedup given in the PR was:

For Windows, between 5% and 14% faster.
For *nix, between 0% and 35% faster.
@erlend-aasland
Copy link
Contributor Author

cc. @eendebakpt, @nineteendo

@AlexWaygood
Copy link
Member

Could you expand on the motivation for removing this news entry?

We ask that all changes that will impact on users have a news entry attached to them. It seems to me that a 6% speedup for such a widely used function is a significant improvement that will be appreciated by users, who will therefore appreciate seeing a mention of it in the changelog.

@eendebakpt
Copy link
Contributor

I am fine with either removing the news entry (the performance gain is real, but not huge), or making it more precise.

Looking at the PR there is also a performance improvement for the join in posixpath.py, so not only windows. The number 6% is debatable: for many arguments of join the gain is smaller, for few arguments the gain is larger. And the gain depends on the platform (and probably also on the input type str/bytes and whether the paths are absolute or not). So I would suggest something neutral like

Improve performance of :func:`os.path.join`.

Any user who wants to know the details can lookup the PR.

@AlexWaygood
Copy link
Member

Yeah, that's certainly fair, "6%" is probably a bit misleading! Arguably a "false sense of precision" rather than "imprecision" ;)

@erlend-aasland
Copy link
Contributor Author

Could you expand on the motivation for removing this news entry?

Oops, it's (implicitly given) in the commit message :)

The speedup given in the PR was:

For Windows, between 5% and 14% faster.
For *nix, between 0% and 35% faster.

@erlend-aasland
Copy link
Contributor Author

Improve performance of :func:os.path.join.

Yep, I would be fine with a vaguer formulation.

@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented Apr 9, 2024

Arguably a "false sense of precision" rather than "imprecision" ;)

"FAKE precision!" 🧢 😆

@erlend-aasland
Copy link
Contributor Author

Competing PR:

@erlend-aasland
Copy link
Contributor Author

Closed in favour of #117697 🔨

@erlend-aasland erlend-aasland deleted the amend-news-entry branch April 9, 2024 19:41
@nineteendo
Copy link
Contributor

I'm incredibly sorry for all the caused trouble. According to my benchmark the performance increase was around 6% on Windows.
And on Unix, we only avoided the overhead of the map() call, which is not noticeable for a large number of components.
Should performance numbers only be mentioned in the news entry when above 100%?

@erlend-aasland
Copy link
Contributor Author

I'm incredibly sorry for all the caused trouble.

No worries; we can amend NEWS entries.

Should performance numbers only be mentioned in the news entry when above 100%?

I think there is no clear answer; it depends on the API, the use-case, and the performance impact. Sometimes a vague wording is fine. Other times, a more precise wording is warranted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting core review docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants