Closed CAFxX closed 3 years ago
Hello Carlo Alberto Ferraris, thanks for contributing a PR to our project!
We use the Oracle Contributor Agreement to make the copyright of contributions clear. We don't have a record of you having signed this yet, based on your email address cafxx -(at)- strayorange -(dot)- com. You can sign it at that link.
If you think you've already signed it, please comment below and we'll check.
Signed
Hi @CAFxX , Please note that simplelanguage is not developed on this repository but rather as part of truffle on https://github.com/oracle/graal/tree/master/truffle, so PRs are to be provided to the main repository. This repo is just a static snapshot to be used as an example starting point for language developers.
With this change, that is really just meant as an example of an additional kind of use cases for
@Cached
, the following contrived example:runs on my machine in:
whereas before it took more than twice as long:
Incidentally, the resulting optimization capability (strength reduction of divisions with non-constant divisors at compile time) is AFAIK not available in any AOT compiler (gcc, clang, icc). There is a point to be made that such an optimization would be better implemented in graalvm itself, rather than sl.