4 ms·
It is bad for performance that Java doesn't have structs, but, you can work around this somewhat using byte buffers: http://www.kdgregory.com/?page=java.byteBu
by sreque 12y ago
It is bad for performance that Java doesn't have structs, but, you can work around this somewhat using byte buffers:
http://www.kdgregory.com/?page=java.byteBuffer http://www.kdgregory.com/?page=java.byteBuffer
- danieldk 12y agoIn the case of arrays, you can also have parallel arrays. E.g.: class Something { public int foo; public int bar; } new SomeThing[100]; becomes: int[] foos = new int[100]; int[] bars = new int[100]; And write appropriate getters/setters.