News for hackers. Stuff that matters.
Re:GraalVM by TimTheTinker on Monday August 10, 2020 @02:28AM (#24106214)
As far as I know, Truffle is able to do some absolutely incredible compile-time optimizations —- reaching deeply into what we would normally regard as strictly semantic territory.

(For an example, see some of the optimizations done by TruffleRuby for things like `myArray.sort.first` - which it apparently optimizes by terminating the sort as soon as the first element is sorted to the front of the array... and all that without any special hints in the standard library. Please correct me if I’m wrong... it’s been a few years since I’ve read in depth about TruffleRuby. And granted this example isn’t Java, but I imagine there are great parallels there.)

Re:GraalVM by tosh on Monday August 10, 2020 @06:35AM (#24107633)
I'm not sure how it would terminate sort early, my initial assumption was that for small arrays there might be special-casing?

this seems to be a related thread on twitter:

https://twitter.com/ChrisGSeaton/status/1001582169578524672

Re:GraalVM by monadic2 on Monday August 10, 2020 @07:36AM (#24108133)
Are you unsure about the runtime considerations or how the compiler would infer the necessary optimizations?
Re:GraalVM by innagadadavida on Monday August 10, 2020 @10:50AM (#24109853)
Can the storage of generic containers change as well? For example, store the objects in the container instead of reference?