4 ms·
It seems like compilers should have an interactive mode where it suggests code that is very similar but not technically perfectly the same that is more efficien
by esrauch 3y ago
It seems like compilers should have an interactive mode where it suggests code that is very similar but not technically perfectly the same that is more efficient and the can accept or decline the alternate version.
- oldmanhorton 3y agoThis sounds like an extension of performance lint rules which many languages/ecosystems already have.
- deleted 3y ago[deleted]
- insanitybit 3y agoA backend compiler is probably not in a good place to do that. Frontends could, however, and there are lots of tools already to make those suggestions for many languages. clippy in rust, for example, will tell you about removing needless allocations, etc, which a backend compiler might have a harder time doing.