News for hackers. Stuff that matters.
Re:Correctness and composability bugs in the Julia ecosystem by celrod on Monday May 16, 2022 @04:16PM (#31402672)
One of my intentions with the rewrite is to let `@turbo` to change the semantics of "unreachable"s, allowing it to hoist them out of loops. This changes the observed behavior of code like

  for i = firstindex(x):lastindex(x)+1
    x[i] += 2
  end
where now, all the iterations that actually would have taken place before the error will not have happened. But, hoisting the error check out when valid will encourage people to write safer code, while still retaining almost all of the performance. There is also a class of examples where the bounds checks will provide the compiler with information enabling optimizations that would've otherwise been impossible -- so there may be cases with the rewrite where `@inbounds` results in slower code than leaving bounds checking enabled.
Re:Correctness and composability bugs in the Julia ecosystem by cbkeller on Monday May 16, 2022 @05:19PM (#31403256)
Oh, nice!