Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[mypyc] Allow specifying primitives as pure#17263

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JukkaL merged 2 commits intomasterfrommypyc-pure-prim
May 19, 2024
Merged

Conversation

@JukkaL
Copy link
Collaborator

Pure primitives have no side effects, take only immutable arguments,
and never fail. These properties will enable additional
optimizations. For example, it doesn't matter in which order
these primitives are evaluated, and we can perform common
subexpression elimination on them.

Only mark a few primitives as pure for now, but we can generalize
this later.

Pure primitives have no side effects, take only immutable arguments,and never fail. These properties will enable additionaloptimizations. For example, it doesn't matter in which orderthese primitives are evaluated, and we can perform commonsubexpression elimination on them.Only mark a few primitivies as pure for now, but we can generalizethis later.
@JukkaLJukkaL merged commitac8a5a7 intomasterMay 19, 2024
@JukkaLJukkaL deleted the mypyc-pure-prim branchMay 19, 2024 08:58
@dmadisetti
Copy link

Is there a timeline / roadmap for pure function detection? Or is this more exploratory?

@JukkaL
Copy link
CollaboratorAuthor

This is specific to primitives, i.e. it isn't used for user-defined functions. Since there is a closed set of primitives, it wouldn't be hard to manually annotate all of them that are pure. There are no plans currently to automatically detect if user-defined functions are pure, if that's what you are interested in.

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

Reviewers

@msullivanmsullivanmsullivan approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@JukkaL@dmadisetti@msullivan

[8]ページ先頭

©2009-2025 Movatter.jp