C++ code much faster than Julia how can I optimize it?

I think the original idea with using it is to make this a fair fight with C++, which doesn’t have inbounds bounds checking.

It’s great that you encourage not using inbounds, and I fully agree it should mostly not be used. But in a performance comparison with C++, not using @inbounds is giving ourselves an unnecessary handicap. Here, its 25% slower.

3 Likes