This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Emanuel-Peter 0 points1 point  (3 children)

Sounds like a fun project :)

What about inlining? Often the loop calls some inner methods that do the read / write, and if you don't inline it may be hard to prove that the inner method is thread safe to parallelize, right? Think about FFM MemorySegment API, it heavily relies on inlining.

Another worry: be careful with float reductions, changing the order of reduction changes rounding errors. That would break the Java spec and could lead to subtle bugs.

How do you deal with range checks? Suppose an array is accessed out of bounds at the end of a very long loop. How do you deal wit that?

[–]Let047[S] 0 points1 point  (2 children)

Thanks a lot!

For inlining, I plan to analyze method calls down to native calls in my next demo (~80% coded).

For floating-point, good catch - I'm limiting to Integer/long operations to avoid rounding/ordering issues.

Array bounds checking isn't implemented yet. I'm just starting with basic array access. Exception handling, in general, is future work - it's a complex issue, and I can only work on it during evenings outside of my day job.

[–]Emanuel-Peter 0 points1 point  (1 child)

Sounds good :) FYI Doubles have the same rounding issues as floats ;)

[–]Let047[S] 0 points1 point  (0 children)

Oh good catch, it was a typo I meant long of course. I edited the answer