Now that Java is open source, one of the first things I would like to do is to disable array bounds checking for certain blocks of code, where I'm dead sure I cannot go offbounds and where performance heavily matters.
Now, I'm not a compilers/grammar expert, so any syntax would be good enough for me: Here's one that I can think of:
pragma_disable_array_bounds_checking_begin
for(x = xMin; x < xMax; x += xIncr) {
for(y = yMin; y < yMax; y += yIncr) {
for(z = zMin; z < zMax; x += zIncr) {
sample_and_draw(voxel[x][y][z]);
}
}
}
pragma_disable_array_bounds_checking_end
I understand that after this change, my local version will cease to be Java. But I care less since I can always bundle the recompiled VM along with my app.
I don't know how to go about making this nontrivial change, hence the question. Note that I'm not interested in the JNI approach.