5 ms·
thank you for sharing the link to Herbie, that looks like a useful tool. If I follow at high level, it looks like Herbie is trying to rewrite expressions to mi
by shoo 5y ago
thank you for sharing the link to Herbie, that looks like a useful tool.
If I follow at high level, it looks like Herbie is trying to rewrite expressions to minimise error without runtime performance constraints.
Are there alternative tools that focus on rewriting code to maximise performance while keeping error below some configurable bound?
i guess compilers are generally focused on the latter problem, perhaps without giving the user much control over the degree of error they are willing to tolerate.
- mattpharr 5y ago> Are there alternative tools that focus on rewriting code to maximise performance while keeping error below some configurable bound? There are! See followup work by @pavpanchekha and others on "Pherbie", which finds a set of Pareto-optimal rewritings of a program so that it's possible to trade-off error and performance: https://ztatlock.net/pubs/2021-arith-pherbie/paper.pdf https://ztatlock.net/pubs/2021-arith-pherbie/paper.pdf.
- shoo 5y agoFantastic! This appears to be available in the command line version of herbie with the `--pareto` flag: > Enables multi-objective improvement. Herbie will attempt to simultaneously optimize for both accuracy and expression cost. Rather than generating a single "ideal" output expression, Herbie will generate many output expressions. This mode is still considered experimental. This will take a long time to run. We recommend timeouts measured in hours.
- adgjlsfhk1 5y agoI've generally been disappointed by ferbie when I've tried it, but this does look really cool. I would love it if this provides a path to making it easier to get good tradeoffs between precision and accuracy.