2 ms·
How about vectors or coordinates? This post from a few years ago comes to mind: http://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraf
by comex 9y ago
How about vectors or coordinates? This post from a few years ago comes to mind:
http://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-mods/1272953-optifine-hd-c7-fps-boost-dynamic-lights-shaders?page=2100#c43757 http://www.minecraftforum.net/forums/mapping-and-modding-jav...
(Allegedly, a Minecraft update added significant strain on the garbage collector by switching the codebase from using separate variables/parameters for x, y, and z coordinates to using a single “BlockPos” object.)
- bunderbunder 9y agoIf you're just using local values, or storing them in an array, then, yeah, value types might help. That's a likely scenario for something like storing arrays of vectors. The spot where you take a hit is when you've got a scattering of individual objects that are being passed into and out of functions. There, the extra data copying has a tendency to outweigh the other benefits. And that's a more likely scenario for most kind of the kinds of business apps that .NET and Java are typically used for.