eclipse-january/january

January should use the intel instructions better

Opened this issue · 2 comments

January abstracts loops inside itself and uses one of its iterators. In the case where a loop could be done in a primitive way, there should be an appropriate test internally to January which checks if a primitive loop could be used and use one. This will speed up certain operations drastically because the VM can pass this down to the intel instructions.

I suggest we start by me writing some speed tests to illustrate the points. @jacobfilik and I hit this issue and it is a thing. For me it was when calculating the Fano factor.

I saw two Soleil guys at Eclipse con France this year and they also have hit the primitive array problem. It seems simple to replace some of the iterations with tests to use primitive array maths if you can or the existing loops/iterations if not. This would make January fly.

The ContiguousIterator class used in the simplest case. Is there any reason why the Hotspot JVM cannot dynamically optimise this case - it is a while-loop?