FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-108985: Make `os.DirEntry.is_symlink` ~twice as fast by sobolevn · Pull Request #108986 · python/cpython · GitHub

Repository navigation

gh-108985: Make os.DirEntry.is_symlink ~twice as fast - #108986

Closed
sobolevn wants to merge 1 commit into
python:mainfrom
sobolevn:issue-108985
Closed

sobolevn wants to merge 1 commit into
python:mainfrom
sobolevn:issue-108985

Conversation

sobolevn commented Sep 6, 2023 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

Two faster functions are twice as good as one faster function 😄

sobolevn commented Sep 6, 2023

Copy link
Copy Markdown
Member Author

Oh,

#elif defined(HAVE_DIRENT_D_TYPE)
    /* POSIX */
    if (self->d_type != DT_UNKNOWN)
        return self->d_type == DT_LNK;
    else
        return DirEntry_test_mode(defining_class, self, 0, S_IFLNK);
#else
    /* POSIX without d_type */
    return DirEntry_test_mode(defining_class, self, 0, S_IFLNK);
#endif

sobolevn closed this Sep 6, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL