inducer / inducer/pytato

Cached mappers potentially traverse expressions multiple times in different function contexts

Open
#544 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
15
Forks
16
Avg merge
17m
Merged PRs (30d)
1

Description

Currently, cached mappers clone themselves with a fresh cache when encountering a function definition. This means that if an expression appears both inside and outside the function, it will be traversed twice. Potentially this could be avoided by caching globally, but currently this can't be done because `Placeholder`s are not globally unique (e.g., a placeholder coming from compilation or from a parent function may have the same name as an argument to the current function, making the two equal even though they represent different things). It might be possible to tag placeholders with the function context somehow in order to make them unique, but I don't currently know of a 100% reliable way to do that.

(@inducer Just summarizing what we talked about at the meeting this morning so I don't forget.)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.